blob: b28f949aadfaced00a83263523dab7aaa3ebd97d [file] [log] [blame]
NAME
SCI_Bcast - Broadcasts messages from the front end to some back ends
C Syntax
#include <sci.h>
int SCI_Bcast(int filter_id, sci_group_t group, int num_bufs, void *bufs[], int sizes[])
INPUT PARAMETERS
filter_id
The id of the message filter (IN).
group
The group which the message belongs to (IN).
num_bufs
The number of buffers of current message segment (IN).
bufs
The array of buffer locations of current message segment (IN).
sizes
The array of buffer sizes of current message segment (IN).
DESCRIPTION
This subroutine is used to broadcast messages from the front end to all
or part of back ends. The receivers can be determined by group if set
filter_id to SCI_FILTER_NULL, which means do not use message filter,
and a predefined group named SCI_GROUP_ALL means all back ends, or can
be determined by filter_id if a new message filter is loaded by
SCI_Filter_load.
This is a non-blocking call. The caller cannot assume that message transfer
has completed upon the return of the function. Instead, the handler function
defined in sci_info_t should be used to ensure the message arrival in the
destination sides.
For more information, please refer to SCI's online documents.
EXAMPLE
{
char msg[256];
int sizes[1];
void *bufs[1];
...
bufs[0] = msg;
sizes[0] = strlen(msg) + 1;
SCI_Bcast(SCI_FILTER_NULL, SCI_GROUP_ALL, 1, bufs, sizes);
}
ERRORS
All SCI routines return an error value.
SCI_ERR_UNINTIALIZED
Uninitialized SCI execution environment
SCI_ERR_INVALID_CALLER
Can only be called in the front end
SCI_ERR_GROUP_NOTFOUND
Undefined group
SCI_ERR_NO_MEM
Out of memory
SEE ALSO
SCI_Upload(3)
SCI_Poll(3)