NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | RESTRICTIONS | ATTRIBUTES | SEE ALSO
#include <exec/chExec.h>int threadName(KnCap *actorcap, int threadli, char *oldname, char *newname);
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
The threadName() system call gets or sets the symbolic name of the thread whose local identifier is threadli, in the actor whose capability is actorcap. If actorcap is K_MYACTOR, the target thread must be in the current actor. In this case, if threadli is K_MYSELF, the current thread is affected.
If oldname is not a NULL pointer, the thread's symbolic name is copied to the caller address space at the location specified by oldname. A thread's symbolic name has a maximum size of K_THREADNAMEMAX (including the NULL character).
If newname is not a NULL pointer, the thread's symbolic name is set to the new name pointed to by newname in the caller address space. The new name is truncated to a maximum size of K_THREADNAMEMAX (including the NULL character).
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 data provided are outside the current actor's address space.
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