Pulses between unrelated processes?

My port of our driving simulator from QNX 4 to Neutrino is coming along
very well. I really only have one sticking place left (at least in
terms of basic functionality - then I can start running it and see what
else is broken).

Our app uses two resource managers; one is the executive manager, which
coordinates all of the other processes (called ‘exec’). The other
provides structured data storage to allow our simulator to replay
scenarios (called ‘replay manager’). Exec starts the replay manager via
a spawnl() command, then controls it (in a very high-level sense) by
opening the replay manager’s prefix and sending commands to it with
devctl(). So exec opens the replay manager, but not vice versa.

At various points during replay, the replay manager needs to notify exec
that certain events have occurred (for example, the current replay has
reached its end). In QNX 4, this was done simply by the replay manager
triggering a proxy to exec; exec created a proxy, then passed it to the
replay manager via an API call.

I’ve been unable to come up with a corresponding construct using pulses
in Neutrino. Is there an easy way for one process to send a pulse to
another process without opening it?

Exec is built on the standard resource manager library and is virtually
identical to the single-threaded resource manager example in the docs.
The replay manager is also built up from the single-threaded example.

Thanks.

Josh Hamacher
FAAC Incorporated

I’ve been unable to come up with a corresponding construct using pulses
in Neutrino. Is there an easy way for one process to send a pulse to
another process without opening it?

MsgDeliverEvent(). Have the Exec process setup a sigevent_t and use a
devctl to pass that structure over to the replay process. Then, when the
replay process needs to notify Exec of an event it can use the rcvid and
the sigevent_t saved from the devctl() handler to invoke MsgDeliverEvent().

The Exec process should setup the sigevent_t for a SIGEV_PULSE and use
message_connect() to make an internal connection to the channel being use
by the resmgr library. Then use pulse_attach() to setup a callback for
the given pulse code.

Hopefully that is enough info (coupled with helpviewer) to get you where you
want to be.

chris

\

Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

That did the trick, it’s working now. Thanks.

Josh


Chris McKillop wrote:

I’ve been unable to come up with a corresponding construct using pulses
in Neutrino. Is there an easy way for one process to send a pulse to
another process without opening it?



MsgDeliverEvent(). Have the Exec process setup a sigevent_t and use a
devctl to pass that structure over to the replay process. Then, when the
replay process needs to notify Exec of an event it can use the rcvid and
the sigevent_t saved from the devctl() handler to invoke MsgDeliverEvent().

The Exec process should setup the sigevent_t for a SIGEV_PULSE and use
message_connect() to make an internal connection to the channel being use
by the resmgr library. Then use pulse_attach() to setup a callback for
the given pulse code.

Hopefully that is enough info (coupled with helpviewer) to get you where you
want to be.

chris