a0SetSelfContext()

Sets a thread context.


Syntax

a0tError a0SetSelfContext(
a0tContext *context
void *data );

Arguments

Namerd/wrDescription
context read Context descriptor.
data read Data to associate with the desciptor.

Description

This function must be called by all threads willing to have a private context data. It associates the pointer data with the thread context descriptor context. Subsequent calls to a0GetSelfContext() with the same context descriptor will return the data pointer. Each thread returns its own private data for the same context descriptor.


Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0Err...Some error occurred.
A0ErrOkSuccessful completion.

See Also

a0NewContext() a0GetSelfContext()