HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
p
pthread_processor_bind_np(3T) pthread_processor_bind_np(3T)
(Pthread Library)
NAME
pthread_num_processors_np(), pthread_processor_bind_np(), pthread_processor_id_np(),
pthread_num_ldoms_np(), pthread_num_ldomprocs_np(), pthread_spu_to_ldom_np(),
pthread_ldom_bind_np(), pthread_ldom_id_np() - determine how many processors are installed in the sys-
tem, bind threads to processors, and determine processor IDs; determine how many locality domains are
installed in the system, bind threads to locality domains, and determine locality domain IDs; respectively
SYNOPSIS
#include <pthread.h>
int pthread_num_processors_np(void);
int pthread_num_ldoms_np(void);
int pthread_num_ldomprocs_np(
int *answer,
pthread_ldom_t ldom
);
int pthread_processor_id_np(
int request,
pthread_spu_t *answer,
pthread_spu_t spu
);
int pthread_ldom_id_np(
int request,
pthread_ldom_t *answer,
pthread_ldom_t ldom
);
int pthread_spu_to_ldom_np(
pthread_spu_t spu,
pthread_ldom_t *ldom
);
int pthread_processor_bind_np(
int request,
pthread_spu_t *answer,
pthread_spu_t spu,
pthread_t tid
);
int pthread_ldom_bind_np(
pthread_ldom_t *answer,
pthread_ldom_t ldom,
pthread_t tid
);
PARAMETERS
request This parameter determines the precise action to be taken by these functions.
answer This parameter is an output parameter in which values are returned. The meaning of
answer depends on request parameter.
spu This parameter gives the value of the spu for certain requests.
ldom This parameter gives the value of the locality domain for certain requests.
tid This parameter gives the value of the thread id for certain requests.
REMARKS
Much of the functionality of this capability is highly dependent on the underlying hardware. An application
that uses these functions should not be expected to be portable across architectures or implementations.
Some hardware platforms support online addition and deletion of processors. Due to this capability, proces-
sors and locality domains may be added or deleted while the system is running. Applications should be writ-
ten to handle processor IDs and locality domain IDs that dynamically appear or disappear (for example,
sometime after obtaining the IDs of all the processors in the system an application may try to bind a thread
HP-UX Release 11i: December 2000 1 Section 3705
___
___