I have a simple multi-threaded resource manager as described here (http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/prog/resmgr.html#SIMPLE_MT_EG) and I have created and connected 2 IO handlers for read() and write() to resmgr_io_funcs_t structure. Both of these handlers contains infinite sleep() call, so when I call read() or write() from client process, I get stuck. This behavior is OK. But the thing is that when I run first client process with read() and then second client process with write() (both connecting to the same device (node of resource manager)) I can see that only one of my IO handler functions was entered. Is this behavior OK when I am using multi-threaded resource manager?
Presumably, both the read and write are to the same device? What’s happening is that the resmanager library is protecting a control block with a mutex. That is why the 2nd call is never entered. To fix this, inside each call before it goes to sleep, it will have to release the mutex, and then when it wakes up, it will have to obtain it again. If that is not enough to get you going, I can give you more details.