#include <exec/chExec.h>int threadDelete(KnCap *actorcap, KnThreadLid threadli);
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.
threadDelete() deletes the thread whose local identifier is threadli in the actor whose capability is actorcap.
If actorcap is K_MYACTOR, the deleted thread must belong to the current actor.
In this case, if threadli is K_MYSELF, the current thread is deleted.
In user mode, pdtThreadDelete() should always be called before threadDelete() is invoked. This frees all per-thread data allocated in the system or in the libraries.
On successful completion, a value of 0 is returned. Otherwise, a negative error code is returned.
actorcap is an inconsistent actor capability, or threadli is not a valid thread identifier in the specified actor.
actorcap does not specify a reachable actor.
Some of the provided data are outside the current actor's address space.
The thread is already in the process of being deleted.
A user actor cannot delete a supervisor thread.
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|