pthread_cluster_get_runmask()

QNX SDP8.0C Library ReferenceAPIDeveloper

Validate a cluster name and provide its associated runmask

Synopsis:

#include <pthread.h>

int pthread_cluster_get_runmask( char const *name,
                                 uint64t *runmask );

Arguments:

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 through the startup-* -c option.

runmask
NULL, or a pointer to a uint64t data type where the function can store the runmask that corresponds to the cores defined in the cluster. If you set this value to NULL, then the function only validates the cluster name.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The pthread_cluster_get_runmask() function validates the cluster indicated by name, and if runmask is a non-NULL pointer, then it writes the cluster's runmask value into the memory referred to by this pointer.

Returns:

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

Classification:

QNX OS

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