Glenn Schmottlach
|
Re: Using resmgr_msg_again to implement blocking read
|
Glenn Schmottlach
10/20/2008 9:28 AM
post15228
|
Re: Using resmgr_msg_again to implement blocking read
I have a question related to this thread. A resource managers read/write handlers receive the following parameters:
int ioWrite(resmgr_context_t* ctp,
io_write_t* msg,
iofunc_ocb_t* ocb)
and
int ioRead(resmgr_context_t* ctp,
io_read_t* msg,
iofunc_ocb_t* ocb)
In the situation where these read/write requests are deferred (e.g. the caller is blocked until there is data available
to read/write and _RESMGR_NOREPLY is returned), can any of the above pointers be safely saved and subsequently
referenced later when the request is finally handled? Ideally, I'd like to create a client structure that contained
copies of the above pointers as the context of the call and use these parameters later to complete the request (whether
it's a read/write). The client structures are maintained in a linked-list owned by the resource manager until the
original request is handled. Are any of the pointers provided by the read/write handlers destroyed when the functions
return (if they're not immediately satisfied and _RESMGR_NOREPLY is returned). What can I assume is safe to cache and
access later?
|
|
|