pthread_cluster_set()

QNX SDP8.0C Library ReferenceAPIDeveloper

Set cluster characteristics for the calling thread

Synopsis:

#include <pthread.h>

int pthread_cluster_set( pthread_t tid,
                         char const *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.

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() function sets cluster characteristics for the calling thread. If the call succeeds, the new runmask takes 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: