Unblocking a Writer in io_write

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
operation
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:

MsgReply
(
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).

Help!

Thanks,
Randy Hyde

MsgReply
(
ctp->rcvid, // Caller ID
nbytesWritten, // Status = bytes written
buffer, // Not sure what goes here, what am I returning?
0 // Ditto
);

Pass in a null and a 0 for the buffer and size - write() doesn’t expect
a reply nor will it do anything with it if you give it one. :slight_smile:

chris

\

Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/