pthread_cluster_set_and_inherit()

QNX SDP8.0C Library ReferenceAPIDeveloper

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 whose characteristics will be assigned to the thread. 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 through the startup-* -c option.

inherit_name
The name of the cluster whose characteristics will be inherited by the thread's children.

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 and for its children. Different clusters (and hence, different characteristics) can be specified for each. If the call succeeds, the new runmasks take effect immediately.

Currently, the only cluster characteristic is the runmask, which indicates the cores defined in the cluster.

Returns:

EOK
Success.
EINVAL
The name specified wasn't found.

Classification:

QNX OS

Safety:
Cancellation point No
Signal handler Yes
Thread Yes
Page updated: