HP-UX Reference (11i v1 05/09) - 3 Library Functions N-Z (vol 7)
p
pthread_attr(3T) pthread_attr(3T)
(Pthread Library)
NAME
pthread_attr_set*(), pthread_attr_get*() - set and get thread attributes
SYNOPSIS
#include <pthread.h>
int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);
int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detach-
state);
int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);
int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stack-
size);
int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr);
int pthread_attr_getstackaddr(const pthread_attr_t *attr, void
**stackaddr);
int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize);
int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guard-
size);
int pthread_attr_setinheritsched(pthread_attr_t *attr,
int inheritsched);
int pthread_attr_getinheritsched(const pthread_attr_t *attr,
int *inheritsched);
int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy);
int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *pol-
icy);
int pthread_attr_setschedparam(pthread_attr_t *attr,
const struct sched_param *param);
int pthread_attr_getschedparam(const pthread_attr_t *attr,
struct sched_param *param);
int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope);
int pthread_attr_getscope(const pthread_attr_t *attr, int *contention -
scope);
int pthread_attr_setprocessor_np(pthread_attr_t *attr,
pthread_spu_t processor, int binding_type);
int pthread_attr_getprocessor_np(const pthread_attr_t *attr,
pthread_spu_t *processor, int *binding_type);
PARAMETERS
attr Pointer to the thread attributes object whose attributes are to be set/retrieved.
detachstate This parameter either specifies the new value of the detachstate attribute (set function)
or it points to the memory location where the detachstate attribute of attr is to be
returned (get function).
stacksize This parameter either specifies the new value of the stacksize attribute (set function) or
it points to the memory location where the stacksize attribute of attr is to be returned
(get function).
stackaddr This parameter either specifies the new value of the stackaddr attribute (set function) or
it points to the memory location where the stackaddr attribute of attr is to be returned
(get function).
guardsize This parameter either specifies the new value of the guardsize attribute (set function) or
it points to the memory location where the guardsize attribute of attr is to be returned
(get function).
Section 3−−680 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005