NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | RESTRICTIONS | ATTRIBUTES | SEE ALSO
#include <exec/chExec.h>int actorPrivilege(KnCap *actorcap, KnActorPrivilege *oldpriv, KnActorPrivilege *newpriv);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
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.
The oldpriv and newpriv are pointers to KnActorPrivilege data. The KnActorPrivilege structure 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 permitted privilege modifications are from user to system or from system to user.
A value of 0 is returned upon successful completion. Otherwise, a negative error code is returned.
actorcap is an inconsistent actor capability.
actorcap does not specify a reachable actor.
The privilege modification is not allowed. A supervisor privilege cannot be changed.
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 | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | RESTRICTIONS | ATTRIBUTES | SEE ALSO