spe_out_mbox_read

NAME

spe_out_mbox_read - read up to count available messages from the SPE outbound mailbox.

SYNOPSIS

#include <libspe2.h>

int spe_out_mbox_read (spe_context_ptr_t spe, unsigned int *mbox_data, int count)

Parameters  
spe Specifies the SPE context of the SPU outbound mailbox to be read.
mbox_data A pointer to an array of count unsigned integers of size to store the 32-bit mailbox messages read by the call.
count The maximum number of mailbox entries to be read by this call.

DESCRIPTION

This function reads up to count available messages from the SPE outbound mailbox for the SPE context spe. This is a non-blocking function call. If less than count mailbox entries are available, only those will be read.

spe_out_mbox_status can be called to ensure that data is available prior to reading the outbound mailbox.

RETURN VALUE

>0 the number of 32-bit mailbox messages read

0 (zero) no data read

EXIT STATUS

On error, -1 is returned and errno is set to indicate the error.

Possible errors include:

ESRCH The specified SPE context is invalid.
EIO The I/O error occurred.
EINVAL The specified pointer to the mailbox message or the specified maximum number of mailbox entries is invalid.

SEE ALSO

spe_out_mbox_status(3)