⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.mqueue

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 MQUEUE
字号:
##  $Id: README.mqueue,v 1.2 2001/01/12 13:34:24 joel Exp $#This program should print out the default attribute settings for a POSIX message queue.#include <mqueue.h>#include <stdio.h>main(){  mqd_t mqfd;  struct mq_attr mqstat;  int status;  /* this should create it */  mqfd = mq_open("myipc",O_WRONLY|O_CREAT,NULL);  if ( (int)mqfd == -1 ) {    perror( "Unable to open message queue" );    exit( 1 );  }  status = mq_getattr(mqfd, &mqstat);  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 );  } else {    perror( "Unable to get attributes on message queue" );    exit( 1 );  }  /* this should delete it */  (void) mq_close( mqfd );  exit( 0 );}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -