pthread_cluster_set_and_inherit()
Set cluster characteristics for the calling thread and for its children to inherit
Synopsis:
#include <pthread.h>
int pthread_cluster_set_and_inherit( pthread_t tid,
char const *name,
char const *inherit_name );
Arguments:
- tid
- Set this argument to zero.
- name
- The name of the cluster. The following clusters are defined in any QNX system:
_all
— A cluster representing all CPUs._cpu-num
— A single CPU cluster, where num specifies the CPU number and starts at 0.For example, if the CPU cluster is associated with CPU0, then you'd set this field to
_cpu-0
.
You can further define clusters in the startup program by configuring the -c command option. For more information on clusters, refer to the
Processor affinity, clusters, runmasks, and inherit masks
page in the Programmer's Guide. - inherit_name
- The name of the cluster that the thread's children inherit.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The pthread_cluster_set_and_inherit() function sets cluster characteristics for the calling thread. Any child of the thread inherits those cluster characteristics. If the call succeeds, the new runmasks take effect immediately.
Currently, the only cluster characteristic is the runmask associated with the thread.
For information on setting a thread's runmask and inherit mask, refer to the entry for the _NTO_TCTL_RUNMASK_GET_AND_SET_INHERIT command on the ThreadCtl() page.
Returns:
- EOK
- Success.
- EINVAL
- The name specified wasn't found.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |