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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [exec/] [posix/] [src/] [README.mqueue] - Blame information for rev 208

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

Line No. Rev Author Line
1 158 chris
#
2 208 chris
#  $Id: README.mqueue,v 1.2 2001-09-27 11:59:17 chris Exp $
3 158 chris
#
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.