Check that a rcvid is valid

How can I check that a given receive id (from MsgReceive()) is still valid?
ie, the thread that called MsgSend() hasn’t exited.

Thanks,
Shaun

Shaun Jackman <sjackman@nospam.vortek.com> wrote:

How can I check that a given receive id (from MsgReceive()) is still valid?
ie, the thread that called MsgSend() hasn’t exited.

To avoid a race condition, just do the MsgReply anyway and check the return
code from that – the race condition can occur if, for example, you just
checked that the rcvid is valid, and were about to then do the reply,
and at that instant it became invalid.

Now, if you’re doing a long and involved calculation and you want to check
that the rcvid is still valid, I’m not sure – however, you will get an
_IO_CLOSE message if you’re using the resource manager framework…

Cheers,
-RK


Robert Krten, PARSE Software Devices +1 613 599 8316.
Realtime Systems Architecture, Books, Video-based and Instructor-led
Training and Consulting at www.parse.com.
Email my initials at parse dot com.