I am trying to create a non-blocking message queue.
I do the following:
attr.mq_flags = MQ_NONBLOCK;
but I get the following errors:
msg.c: In function `start1':
msg.c:85: `MQ_NONBLOCK' undeclared (first use this function)
msg.c:85: (Each undeclared identifier is reported only once
msg.c:85: for each function it appears in.)
make: *** [msg.o] Error 1
If I set the above line to
attr.mq_flags = 0;
the compiler does'nt complain.
I need to add a library but dunno which one. Any suggestions?
Thanks,
Chirag
I do the following:
attr.mq_flags = MQ_NONBLOCK;
attr.mq_flags = 0;
Thanks,
Chirag
----- End Included Message -----
In vxworks message queue you can specify the timeout parameter you can
specify NO_WAIT for non blocking.
I think you are using posix message queues. For the posix message queue the
flag will be O_NONBLOCK in order to open a non blocking message queue.
Hence in your case it will be attr.mq_flags= O_NONBLOCK;
If it still give O_NONBLOCK undeclared then you need to invoke posix library
in your vxworks
image.
Thanks & regards,
Shibasis
Hello,
I do the following:
attr.mq_flags = MQ_NONBLOCK;
attr.mq_flags = 0;
Thanks,
Chirag
_______________________________________________
VxWexplo mailing list
VxWe...@csg.lbl.gov
http://www-csg.lbl.gov/mailman/listinfo/vxwexplo