NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | RESTRICTIONS | ATTRIBUTES | SEE ALSO
#include <exec/chExec.h>int actorPrivilege(KnCap *actorcap, KnActorPrivilege *oldpriv, KnActorPrivilege *newpriv);
CORE
actorPrivilege gets and/or sets the privilege of the actor the capability of which is given by actorcap. If actorcap is K_MYACTOR, the operation is applied to the current actor.
oldpriv and newpriv are pointers to KnActorPrivilege data. KnActorPrivilege represents the actor privilege, as described in actorCreate (2K).
If oldpriv is a NULL pointer, the actor's privilege is not copied in the caller's address space. If newpriv is a NULL pointer, the actor's privilege is not modified. The calling thread must be a SUPERVISOR thread (see threadCreate(2K)) or must belong to a SYSTEM actor (see actorCreate(2K)).
The only allowed privilege modifications are from USER to SYSTEM or from SYSTEM to USER.
Upon successful completion a value of 0 is returned. Otherwise, a negative error code is returned.
actorcap is an inconsistent actor capability.
actorcap does not specify a reachable actor.
Some of the provided data are outside the current actor's address space.
The current thread is neither a supervisor thread nor a thread of a system actor.
The target actor and the current actor must be located on the same site.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | RESTRICTIONS | ATTRIBUTES | SEE ALSO