Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[VxW] nonblocking message queue

207 views
Skip to first unread message

Chirag H. Shroff

unread,
Mar 7, 2003, 6:24:02 PM3/7/03
to vxwe...@csg.lbl.gov

Hello,

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

Chirag H. Shroff

unread,
Mar 7, 2003, 6:35:45 PM3/7/03
to vxwe...@csg.lbl.gov

Hello,

I do the following:

attr.mq_flags = MQ_NONBLOCK;

attr.mq_flags = 0;

Thanks,

Chirag


----- End Included Message -----

Shibasis Ganguly

unread,
Mar 10, 2003, 8:38:30 AM3/10/03
to VxWorks Users Group List
Dear Chrag,
There two kind of message queue in vxworks.One is vxworks own message queue
and
another is posix compliant message queue. msgQLib is the library for the
wind message
queue and mqPxLib is library for the posix compliant message queue.
If you are using tornado as the development platform .Then if you explore
the vxworks image
varoius component you will find message queues under the kernel components
under os component.
You will find the posix component under the operating system components.If
posix component is not hilighted means it not included in your vxowrks
image.You can include this componets from tornado
workspace."INCLUDE_POSIX_MQ" macro that indicates that posix component has
been included.INCLUDE_POSIX_MQ macro will be in prjComs.h which is
dynamically generated from the workspace configuartion .

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

0 new messages