Next: Relative Protocol Numbers Up: Participant Library Previous: Type Definitions

Participant List Operations

The following operations provide a convenient interface that hides the PartStack data structure. However, the fact that a participant list is really an array of type Part is visible to the programmer.

partInit

Initialize participant list p of N participants.

void partInit(Part * p, int N );

partPush

Pushes address addr, pointing to len bytes, onto the stack of participant p. A length of 0 indicates a ``special-value'' pointer (e.g., ANY_HOST) whose value as a pointer should be preserved across protection boundaries (and not dereferenced.) See section 3.4 below.

void partPush ( Part p, void * addr, int len)

partPop

Pops an address off the stack of participant p. Returns NULL if there are no more elements on the stack.

void * partPop(Part p )

partStackTopByteLen

Returns the number of bytes pointed to by the top element of the stack of participant p. Returns 0 if the stack element was pushed with a length field of zero (i.e., a ``special-value'' pointer.) Returns -1 if there are no elements on the stack.

int partStackTopByteLen(Part p )

partLen

Reports the number of participants in participant list p.

int partLen( Part * p )

partExternalize

Takes a participant list p and externalizes it into buf in a form appropriate for transmission across a protection boundary, essentially dereferencing all the pointers except special-value pointers pushed with length == 0. The int pointed to by len holds the size of the buffer going in and holds the number of bytes written to the buffer on return. If the buffer is not large enough, partExternalize will fail.

xkern_return_t partExternalize ( Part * pList, void * buf, int * len )

partInternalize

Takes an externalized participant buffer buf resulting from partExternalize and recreates the participants in the uninitialized participant list p.

void partInternalize ( Part * p, void * buf )

partExtLen

Reports the number of participants in an externalized participant buffer buf resulting from partExternalize. This can be useful for allocating the appropriate sized participant list to pass to partInternalize.

int partExtLen( void * buf )

GETPARTICIPANTS

The participant list used to create a session can be retrieved via the GETPARTICIPANTS control operation. See section 10.1.2.



Next: Relative Protocol Numbers Up: Participant Library Previous: Type Definitions


Tue Nov 29 16:28:56 MST 1994