Download RadiSys ARTIC960 Programmer`s Reference

Transcript
GetMbxBuffer—Get a Free Mailbox Buffer
GetMbxBuffer—Get a Free Mailbox Buffer
This allocates a free mailbox buffer to the requesting process.
Functional Prototype
RIC_ULONG
GetMbxBuffer (RIC_MBXHANDLE MbxHandle,
RIC_ULONG
Size,
void
*RIC_SUPTR *MsgPtr,
RIC_ULONG
Reserved);
Parameters
MbxHandle
Input. Handle of the mailbox from which the process wants to get a message
buffer.
Size
Input. Message size in bytes. The size is rounded up to a multiple of the
message unit size set by CreateMbx or OpenMbx. The size parameter must
be in the range 0 < Size < 65503.
MsgPtr
Output. Pointer to allocated mailbox buffer.
Reserved
Input. Reserved parameter (must be 0).
Returns
RC_SUCCESS
RC_INVALID_HANDLE
RC_INVALID_RESERVED_PARM
RC_INVALID_SIZE
RC_NO_MBX_BUFFER
RC_NO_MBX_PROCESS
RC_NO_MBX_RECEIVER
Remarks
No more than 65503 bytes can be allocated with a single call to GetMbxBuffer.
282
ARTIC960 Programmer’s Reference