I'm a StackExchange noob, so please excuse the formatting.
Linux version 3.4.44
distribution Angstrom 2011.03 \n \l
gcc version 4.3.3
The output from the following code shows:
m_msgQueue attributes: mq_flags=0, mq_maxmsg=5, mq_msgsize=15, mq_curmsgs=0
struct mq_attr stAttr;
int m_msgQueue;
const char* m_pszMsgQueueName = "/ThreadWatchdog";
memset( &stAttr, 0, sizeof(stAttr) );
stAttr.mq_flags = O_NONBLOCK;
stAttr.mq_maxmsg = 5;
stAttr.mq_msgsize = sizeof(THREAD_WATCHDOG_MSG) - 1;
// set up the message queue to receive thread watchdog requests
m_msgQueue = mq_open( m_pszMsgQueueName, O_CREAT | O_RDWR, 666, &stAttr );
if( m_msgQueue > 0 )
{
struct mq_attr stAttr;
mq_getattr( m_msgQueue, &stAttr );
printf("\nm_msgQueue attributes: mq_flags=%ld, mq_maxmsg=%ld, mq_msgsize=%ld, mq_curmsgs=%ld",
stAttr.mq_flags,
stAttr.mq_maxmsg,
stAttr.mq_msgsize,
stAttr.mq_curmsgs
);
Is there something configured incorrectly in my kernel? What is the typical location for the default message queue configuration? I only see msg_max, msgsize_max and queue_max in /proc/sys/fs/mqueue.