URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [exec/] [posix/] [src/] [README.mqueue] - Rev 208
Go to most recent revision | Compare with Previous | Blame | View Log
#
# $Id: README.mqueue,v 1.2 2001-09-27 11:59:17 chris Exp $
#
This program should print out the default attribute settings for a
POSIX message queue.
#include <mqueue.h>
main()
{
mqd_t mqfd;
struct mq_attr mqstat;
int status;
mqfd = mq_open("myipc",O_WRONLY|O_CREAT,NULL);
status = mq_getattr(mqfd, &mqstat);
printf( "status: %d\n", status );
if ( !status ) {
printf( "mq_maxmsg: %d\n", mqstat.mq_maxmsg );
printf( "mq_msgsize: %d\n", mqstat.mq_msgsize );
printf( "mq_curmsgs: %d\n", mqstat.mq_curmsgs );
}
exit( 0 );
}
Go to most recent revision | Compare with Previous | Blame | View Log