OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [src/] [README.mqueue] - Blame information for rev 757

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
#
2
#  $Id: README.mqueue,v 1.2 2001-09-27 11:59:17 chris Exp $
3
#
4
 
5
This program should print out the default attribute settings for a
6
POSIX message queue.
7
 
8
#include 
9
 
10
main()
11
{
12
  mqd_t mqfd;
13
  struct mq_attr mqstat;
14
  int status;
15
 
16
  mqfd = mq_open("myipc",O_WRONLY|O_CREAT,NULL);
17
 
18
  status = mq_getattr(mqfd, &mqstat);
19
  printf( "status: %d\n", status );
20
  if ( !status ) {
21
    printf( "mq_maxmsg: %d\n", mqstat.mq_maxmsg );
22
    printf( "mq_msgsize: %d\n", mqstat.mq_msgsize );
23
    printf( "mq_curmsgs: %d\n", mqstat.mq_curmsgs );
24
  }
25
  exit( 0 );
26
}
27
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.