mqueue question

bridged with qdn.public.neutrino
Post Reply
Jack Rosenbloom

mqueue question

Post by Jack Rosenbloom » Thu Jul 10, 2003 8:10 pm

Hi all,

I have a file handle received from a call to mq_open. Is there any
danger using this handle in a writev call? It seems to work OK. What
is the message priority?

Thanks
Jack

Ben Gardner

Re: mqueue question

Post by Ben Gardner » Sat Jul 19, 2003 11:13 pm

In QNX its just another resource manager, so you can use any standard call.
The priority is used to sort the messages when more than one is in a queue.

Ben

Jack Rosenbloom wrote:
Hi all,

I have a file handle received from a call to mq_open. Is there any
danger using this handle in a writev call? It seems to work OK. What
is the message priority?

Thanks
Jack

Jack Rosenbloom

Re: mqueue question

Post by Jack Rosenbloom » Mon Jul 21, 2003 12:42 pm

Thanks for the reply. My question on priority was not what prior is all
about. If I send a message to an mqueue with a writev call, what is the
priority of that message since I do not get to explicitly set the priority?

Thanks,
Jack

Ben Gardner wrote:
In QNX its just another resource manager, so you can use any standard call.
The priority is used to sort the messages when more than one is in a queue.

Ben

Jack Rosenbloom wrote:

Hi all,

I have a file handle received from a call to mq_open. Is there any
danger using this handle in a writev call? It seems to work OK. What
is the message priority?

Thanks
Jack

Xiaodan Tang

Re: mqueue question

Post by Xiaodan Tang » Wed Jul 23, 2003 5:19 pm

The mq_open() returns a mqd_t, nothing says it is a file descriptor,
so DO NOT use it as a file descriptor (read/write/select ... ).

Even though you don't get an error writex() to it, but this could
be changed from release to release, and your application will
suddenly stop working.

-xtang

Jack Rosenbloom <jrosenbloom@vertisinc.com> wrote in message
news:3F1BDFCB.70804@vertisinc.com...
Thanks for the reply. My question on priority was not what prior is all
about. If I send a message to an mqueue with a writev call, what is the
priority of that message since I do not get to explicitly set the
priority?

Thanks,
Jack

Ben Gardner wrote:
In QNX its just another resource manager, so you can use any standard
call.
The priority is used to sort the messages when more than one is in a
queue.

Ben

Jack Rosenbloom wrote:

Hi all,

I have a file handle received from a call to mq_open. Is there any
danger using this handle in a writev call? It seems to work OK. What
is the message priority?

Thanks
Jack


Ben Gardner

Re: mqueue question

Post by Ben Gardner » Thu Jul 24, 2003 12:06 am

The priority defaults to 0.

Jack Rosenbloom wrote:
Thanks for the reply. My question on priority was not what prior is all
about. If I send a message to an mqueue with a writev call, what is the
priority of that message since I do not get to explicitly set the priority?

Thanks,
Jack

Jack Rosenbloom

Re: mqueue question

Post by Jack Rosenbloom » Thu Jul 24, 2003 7:30 pm

Ben says its OK, Xiaodan says NO. Xiaodan, I see you have a QNX
address. is your response the offical QNX position. Under qnx4, I have
use mqd_t values in select calls alot. What would be the recommented
method to write to a mqueue when the data already exists in a number of
buffers and I don't want to build a single buffer prior to sending.

Jack


Xiaodan Tang wrote:
The mq_open() returns a mqd_t, nothing says it is a file descriptor,
so DO NOT use it as a file descriptor (read/write/select ... ).

Even though you don't get an error writex() to it, but this could
be changed from release to release, and your application will
suddenly stop working.

-xtang

Jack Rosenbloom <jrosenbloom@vertisinc.com> wrote in message
news:3F1BDFCB.70804@vertisinc.com...

Thanks for the reply. My question on priority was not what prior is all
about. If I send a message to an mqueue with a writev call, what is the
priority of that message since I do not get to explicitly set the

priority?

Thanks,
Jack

Ben Gardner wrote:

In QNX its just another resource manager, so you can use any standard

call.

The priority is used to sort the messages when more than one is in a

queue.

Ben

Jack Rosenbloom wrote:


Hi all,

I have a file handle received from a call to mq_open. Is there any
danger using this handle in a writev call? It seems to work OK. What
is the message priority?

Thanks
Jack



Post Reply

Return to “qdn.public.neutrino”