![]() |
![]() |
![]() |
Unblock a client and set its errno
#include <sys/neutrino.h> int MsgError( int rcvid, int error ); int MsgError_r( int rcvid, int error );
libc
The MsgError() and MsgError_r() functions are identical except in the way they indicate errors. See the Returns section for details.
These kernel calls unblock the client's MsgSend*() with a -1 return value, and sets the client's errno to error.
No data is transferred when you call MsgError().
The rcvid argument is the return value from MsgReceive*().
![]() |
The return error number, ERESTART, causes the sender to immediately call Msgsend*() again. Since the send buffers may overlap, ERESTART shouldn't be used after a MsgWrite(). |
None. In the network case, lower priority threads may run.
The MsgError() function has increased latency when it's used to communicate across a network -- the server is now writing the error code to its local npm-qnet, which may need to communicate with the client's npm-qnet to actually transfer the error code.
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
ChannelCreate(), MsgRead(), MsgReadv(), MsgReceive(), MsgReceivev(), MsgSend(), MsgSendv()
![]() |
![]() |
![]() |