An actor that does not require the services of the C_OS, and created with actorCreate(), can be deleted using the actorDelete() call, (provided you have the actor capability).
void main()
{
KnActorPrivilege actPriv;
KnCap actCap;
int err;
actPriv = K_SUPACTOR;
err = actorCreate(K_MYACTOR, &actCap;, actPriv, K_STOPPED);
if (err != K_EOK) {
printf("actorCreate %d\n", err);
}
err = actorDelete(&actCap;);
if (err != K_EOK) {
printf("actorDelete %d\n", err);
}
}
Processes can be deleted using the standard POSIX call kill(). See the kill(2POSIX) man page for more information.