pthread_attr_getdetachstate.3t (2010 09)

p
pthread_attr_getdetachstate(3T) pthread_attr_getdetachstate(3T)
(Pthread Library)
pthread_attr_setprocessor_np()
is used to set the processor and binding_type attributes in the
initialized attributes object attr . The new values of the processor and binding_type attributes are passed
to this function in the processor and binding_type parameters, respectively.
pthread_attr_getprocessor_np()
retrieves the values of the processor and binding_type attri-
butes from the thread attributes object attr . These values are returned in the processor and binding_type
parameters, respectively.
If the value of the processor attribute is
PTHREAD_SPUINHERIT_NP
, PTHREAD_SPUFLOAT_NP
,
PTHREAD_LDOMINHERIT_NP
,or
PTHREAD_LDOMFLOAT_NP
the value of the binding_type attribute
should be ignored (float implies there will be no binding for the created thread, inherit implies that the
attribute will be set when the new thread is created based on the creating thread’s attributes).
If the value of the binding_type attribute is
PTHREAD_BIND_NONE_NP
the processor attribute should be
ignored.
RETURN VALUE
Upon successful completion, the following functions return zero:
pthread_attr_setstacksize()
,
pthread_attr_getstacksize()
, pthread_attr_setstackaddr()
,
pthread_attr_getstackaddr()
, pthread_attr_setguardsize()
,
pthread_attr_getstack()
,
pthread_attr_setstack()
,
pthread_attr_getguardsize()
, pthread_attr_setdetachstate()
,
pthread_attr_getdetachstate()
, pthread_attr_setinheritsched()
,
pthread_attr_getinheritsched()
, pthread_attr_setschedpolicy()
,
pthread_attr_getschedpolicy()
, pthread_attr_setschedparam()
,
pthread_attr_getschedparam()
, pthread_attr_setprocessor_np()
,
pthread_attr_getprocessor_np()
, pthread_attr_setscope()
, and
pthread_attr_getscope().
Otherwise, an error number is returned to indicate the error (the
errno variable is not set).
ERRORS
If any of the following occur, the
pthread_attr_setscope()
, pthread_attr_getscope()
,
pthread_attr_setinheritsched()
, pthread_attr_getinheritsched()
,
pthread_attr_setschedpolicy()
, and pthread_attr_getschedpolicy()
functions
return the corresponding error number:
[ENOSYS]
_POSIX_THREAD_PRIORITY_SCHEDULING
is not defined and these functions
are not supported.
If any of the following occur, the
pthread_attr_getstackaddr()
and
pthread_attr_setstackaddr()
functions return the corresponding error number:
[ENOSYS]
_POSIX_THREAD_ATTR_STACKADDR
is not defined and these functions are not
supported.
If any of the following occur, the
pthread_attr_getstacksize()
and
pthread_attr_setstacksize() functions return the corresponding error number:
[ENOSYS]
_POSIX_THREAD_ATTR_STACKSIZE is not defined and these functions are not
supported.
If any of the following occur,
pthread_attr_setstacksize(),
pthread_attr_getstacksize(), pthread_attr_setstackaddr()
,
pthread_attr_getstackaddr(), pthread_attr_setstack()
,
pthread_attr_getstack(), pthread_attr_setrsestackszie_np()
,
pthread_attr_getrsestackszie_np(),
pthread_attr_setguardsize(),
pthread_attr_getguardsize(), pthread_attr_setdetachstate()
,
pthread_attr_getdetachstate(), pthread_attr_setinheritsched(),
pthread_attr_getinheritsched(), pthread_attr_setschedpolicy(),
pthread_attr_getschedpolicy(), pthread_attr_setschedparam(),
pthread_attr_getschedparam(), pthread_attr_setprocessor_np(),
pthread_attr_getprocessor_np(), pthread_attr_setscope(), and
pthread_attr_getscope() return the corresponding error number:
[EINVAL] The value specified by attr is invalid.
[EINVAL] The value specified by stacksize is less than the minimum required stacksize of
PTHREAD_STACK_MIN or exceeds a system-imposed limit.
HP-UX 11i Version 3: September 2010 7 Hewlett-Packard Company 7