a0StartRemoteThread()

Creates a thread on a remote node.


Syntax

a0tError a0StartRemoteThread(
int node,
int service,
a0tScheduling sched,
int prio,
size_t stack,
a0tRequest *request,
a0tBuffer *buffer );

Arguments

Namerd/wrDescription
node read Node on which the thread is started.
service read Service to be executed by the thread.
sched read Scheduling rule of the thread.
prio read Priority of the thread.
stack read Stack size of thread.
request write Request descriptor to hold the status.
buffer read Buffer passed to the thread.

Description

A thread is created on node node to execute the service service with scheduling rule sched, priority prio and stack size stack. A0ServiceScheduling, A0ServicePriority and A0ServiceStack indicate that the values to be used are the ones defined with the service, at the a0NewService() function call. See A0DefaultScheduling and A0DefaultPriority for other possible values. This function blocks the calling thread until the service startes to execute remotely.

If no parameters are needed, a NULL buffer can be passed to this function.

The created thread receives the buffer buffer (that must be of type A0ThreadBufferType) with parameters that have been packed by the caller before the call to a0StartRemoteThread().


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

a0NewService() a0StartRemoteUrgent() a0IStartRemoteThread()