TASK_WAIT
Purpose
task_wait waits
for the termination of a task.
Synopsis
#include <types.h>
#include <stub.h>
int task_wait(Capability
*task, int *exit_status);
Parameters
-
task: a capability for the task
to be waited for;
-
exit_status: the task's termination
status.
Description
task_wait waits the task designated
by task to terminate and returns its termination state in exit_status.
The calling thread is blocked until the task terminates, either by calling
task_exit or because some other thread executed
task_destroy on it.
Return Values
On success, task_wait returns 0 and
exit_status contains the termination status of the task being waited
for.
On fail, task_wait returns a negative
value indicating one of the following errors:
See Also
task_create,
task_destroy, task_status,
task_self, task_exit