I’m writing a resource manager under Neutrino, and would like to ask a
The resource manager I’m writing registers few names under /dev. Only one
set of connect_funcs and io_funcs is registered for all the pathnames. I
would like then, in my io_read and io_write, to use a “case” structure, in
order to deal with the different registered devices. To do that I need to
know which device each call to io_read()/io_write() was intended for. It
appears to me that the way to do this is to compare the id field of the
resmgr_context structure passed to the io_read()/io_write() with the id that
was returned by resmgr_attach() for each device.
Here is my question: is this the appropriate way to deal with more pathnames
in a ResMgr ? What puzzles me is that in his nice book “Getting started with
QNX Neutrino 2” pag. 270 Rob Krten says about resmgr_context.id: “You’d most
likely never use this parameter yourself”.
Am I going absolutely wrong about the structure of my ResMgr ?
Thanks a lot for any comment,