producer up code calling other code

If I load a network driver with mount -T io-net, and then later load a piece
of code that will need to exchange some packets with this driver (which is
not being using until the second piece of code is executed), can the two
programs call routines within each other? The non-driver code is already
written and is expecting to call a routine to get a packet and passes the
address of its receive routine for the driver to call when it receives a
packet. Is this possible? If not, is message queues the best way to xfer
between the driver and the non-driver code?

Jay Witherspoon <spoon@scubadiving.com> wrote:

If I load a network driver with mount -T io-net, and then later load a piece
of code that will need to exchange some packets with this driver (which is
not being using until the second piece of code is executed), can the two
programs call routines within each other? The non-driver code is already
written and is expecting to call a routine to get a packet and passes the
address of its receive routine for the driver to call when it receives a
packet. Is this possible? If not, is message queues the best way to xfer
between the driver and the non-driver code?

If they are in the same process (io-net here) you can do this, otherwise
to need some form of IPC.

-seanb

Is there a significant performance penalty with POSIX queues (mq_xxx) and
QNX raw messaging (MsgXXX)?

“Sean Boudreau” <seanb@node25.ott.qnx.com> wrote in message
news:arghbj$1h8$1@nntp.qnx.com

Jay Witherspoon <> spoon@scubadiving.com> > wrote:
If I load a network driver with mount -T io-net, and then later load a
piece
of code that will need to exchange some packets with this driver (which
is
not being using until the second piece of code is executed), can the two
programs call routines within each other? The non-driver code is
already
written and is expecting to call a routine to get a packet and passes
the
address of its receive routine for the driver to call when it receives a
packet. Is this possible? If not, is message queues the best way to
xfer
between the driver and the non-driver code?

If they are in the same process (io-net here) you can do this, otherwise
to need some form of IPC.

-seanb

should say vs, not and…
Is there a significant performance penalty with POSIX queues (mq_xxx) vs
QNX raw messaging (MsgXXX)?

“Jay Witherspoon” <spoon@scubadiving.com> wrote in message
news:arj5tp$ki3$1@inn.qnx.com

Is there a significant performance penalty with POSIX queues (mq_xxx) and
QNX raw messaging (MsgXXX)?

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:arghbj$1h8$> 1@nntp.qnx.com> …
Jay Witherspoon <> spoon@scubadiving.com> > wrote:
If I load a network driver with mount -T io-net, and then later load a
piece
of code that will need to exchange some packets with this driver
(which
is
not being using until the second piece of code is executed), can the
two
programs call routines within each other? The non-driver code is
already
written and is expecting to call a routine to get a packet and passes
the
address of its receive routine for the driver to call when it receives
a
packet. Is this possible? If not, is message queues the best way to
xfer
between the driver and the non-driver code?

If they are in the same process (io-net here) you can do this, otherwise
to need some form of IPC.

-seanb
\

MsgXXX directly pass the data (one copy), where mq_XXX pass the data
twice (two copy).

-xtang
Jay Witherspoon <spoon@scubadiving.com> wrote in message
news:arj719$m0k$1@inn.qnx.com

should say vs, not and…
Is there a significant performance penalty with POSIX queues (mq_xxx) vs
QNX raw messaging (MsgXXX)?

“Jay Witherspoon” <> spoon@scubadiving.com> > wrote in message
news:arj5tp$ki3$> 1@inn.qnx.com> …
Is there a significant performance penalty with POSIX queues (mq_xxx)
and
QNX raw messaging (MsgXXX)?

“Sean Boudreau” <> seanb@node25.ott.qnx.com> > wrote in message
news:arghbj$1h8$> 1@nntp.qnx.com> …
Jay Witherspoon <> spoon@scubadiving.com> > wrote:
If I load a network driver with mount -T io-net, and then later load
a
piece
of code that will need to exchange some packets with this driver
(which
is
not being using until the second piece of code is executed), can the
two
programs call routines within each other? The non-driver code is
already
written and is expecting to call a routine to get a packet and
passes
the
address of its receive routine for the driver to call when it
receives
a
packet. Is this possible? If not, is message queues the best way
to
xfer
between the driver and the non-driver code?

If they are in the same process (io-net here) you can do this,
otherwise
to need some form of IPC.

-seanb


\

Jay Witherspoon <spoon@scubadiving.com> wrote:

Is there a significant performance penalty with POSIX queues (mq_xxx) and
QNX raw messaging (MsgXXX)?

Yes.

mq_send is a S/R/R with mqueue process.
mq_recv is a S/R/R with mqueue process.

So mq_send to mq_recv is 2 S/R/R, at least twice as many context switches,
plus queueing/dequeueing overhead in mqueue.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.