mqueue question

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

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

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

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

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

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
\