NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUES | ATTRIBUTES | SEE ALSO | RESTRICTIONS
#include <am/await.h>int awaits(const KnCap * cactorcap, int * statusp);
ACTOR_EXTENDED_MNGT
The awaits() call blocks the caller until the c_actor identified by cactorcap (see afexec(2K) ) terminates or stops due to tracing.
If statusp is not NULL , the status of the c_actor designated by cactorcap is stored in the location pointed to by statusp upon successful return from awaits() . It indicates why the c_actor terminated or stopped.
The
IS_EXIT_EVT
,
GET_EXIT_EVT
,
IS_KILL_EVT
,
GET_KILL_EVT
,
IS_STP_EVT
and
GET_STP_EVT
macros take an argument of the
int
type as returned by
awaits()
in the location pointed to by
statusp
. If the c_actor terminated due to a call to
_exit(2K)
,
IS_EXIT_EVT
will be true (
1
) and
GET_EXIT_EVT
will be the low-order byte of the argument the c_actor passed to
_exit()
. If the c_actor terminated due to an asynchronous event (exception,
actorDelete(2K)
, and so forth)
IS_KILL_EVT
will be true (
1
). If the c_actor was being debugged and caught an exception,
IS_STP_EVT
will be true (
1
). In both of these cases
GET_KILL_EVT
or
GET_STP_EVT
will be the number of the event which caused the c_actor to
terminate or stop.
The following events are valid:
(illegal instruction exception)
(breakpoint exception)
(floating point exception)
(memory protection exception)
(c_actor killed by akill(2K) )
(c_actor killed by actorDelete(2K) )
The await() call performs the same function as awaits() , and should be used when statusp is a NULL pointer.
Both awaits() and await() return the aid of the c_actor which terminated or stopped due to tracing; otherwise they return -1 and set errno to indicate one of the following error conditions:
cactorcap refers to the calling c_actor.
cactorcap doesn't designate a valid c_actor.
cactorcap or statusp points to an illegal address.
The calling thread was aborted before the execution of the c_actor was terminated.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
It is not currently possible to distinguish between terminated c_actors and invalid actor capabilities.
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUES | ATTRIBUTES | SEE ALSO | RESTRICTIONS