send_message
Send a message, consisting of a number of bytes and optionally a number of handles, down a Channel
.
All the handles are removed from the sending Task
and added to the receiving Task
.
A maximum of 4 handles can be transferred by each message. The maximum number of bytes is currently 4096.
Parameters
a
- the handle to theChannel
end that is sending the message. The handle must have theSEND
right.b
- a pointer to the array of bytes to sendc
- the number of bytes to sendd
- a pointer to the array of handle entries to transfer. All handles must have theTRANSFER
right. This may be0x0
if the message does not transfer any handles.e
- the number of handles to send
Returns
A status code:
0
if the system call succeeded and the message was sent1
if theChannel
handle is invalid2
if theChannel
handle does not point to aChannel
3
if theChannel
handle does not have the correct rights to send messages4
if one or more of the handles to transfer is invalid5
if any of the handles to transfer do not have the correct rights6
if the pointer to the message bytes was not valid7
if the message's byte array is too large8
if the pointer to the handles array was not valid9
if the handles array is too large10
if the other end of theChannel
has been disconnected
Capabilities needed
None.