In numerous examples of resource managers you find calls to MsgReply
that unblock the reader while the io_read thread goes about its business
completing whatever needs to be done for the read process (when io_read
finishes, it returns _RESMGR_NOREPLY). Is it possible to do this same
thing with io_write? I need to unblock the writing process as rapidly as
possible so it may continue with its business, but the physical write
could take a fair amount of time (e.g., it could block while a large read
operation is completing on the device).
I assume I can do something like this:
ctp->rcvid, // Caller ID
nbytesWritten, // Status = bytes written
buffer, // Not sure what goes here, what am I returning?
0 // Ditto
return( _RESMGR_NOREPLY );
As the comments indicate, I’m not sure what message
data I should be replying with (if anything).