MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
PTHREADATR(3)          BSD Library Functions Manual          PTHREADATR(3)

NAME
     pthreadattrinit, pthreadattrdestroy, pthreadattrsetstacksize,
     pthreadattrgetstacksize, pthreadattrsetstackaddr,
     pthreadattrgetstackaddr, pthreadattrsetdetachstate,
     pthreadattrgetdetachstate, pthreadattrsetinheritsched,
     pthreadattrgetinheritsched, pthreadattrsetschedparam,
     pthreadattrgetschedparam, pthreadattrsetschedpolicy,
     pthreadattrgetschedpolicy, pthreadattrsetscope, pthreadattrgetscope
     -- thread attribute operations

SYNOPSIS
     ##include <>

     int
     pthreadattrinit(pthreadattrt *attr);

     int
     pthreadattrdestroy(pthreadattrt *attr);

     int
     pthreadattrsetstacksize(pthreadattrt *attr, sizet stacksize);

     int
     pthreadattrgetstacksize(const pthreadattrt *attr, sizet *stacksize);

     int
     pthreadattrsetstackaddr(pthreadattrt *attr, void *stackaddr);

     int
     pthreadattrgetstackaddr(const pthreadattrt *attr, void **stackaddr);

     int
     pthreadattrsetdetachstate(pthreadattrt *attr, int detachstate);

     int
     pthreadattrgetdetachstate(const pthreadattrt *attr,
         int *detachstate);

     int
     pthreadattrsetinheritsched(pthreadattrt *attr, int inheritsched);

     int
     pthreadattrgetinheritsched(const pthreadattrt *attr,
         int *inheritsched);

     int
     pthreadattrsetschedparam(pthreadattrt *attr,
         const struct schedparam *param);

     int
     pthreadattrgetschedparam(const pthreadattrt *attr,
         struct schedparam *param);

     int
     pthreadattrsetschedpolicy(pthreadattrt *attr, int policy);

     int
     pthreadattrgetschedpolicy(const pthreadattrt *attr, int *policy);

     int
     pthreadattrsetscope(pthreadattrt *attr, int contentionscope);

     int
     pthreadattrgetscope(const pthreadattrt *attr, int *contentionscope);

DESCRIPTION
     Thread attributes are used to specify parameters to pthreadcreate().
     One attribute object can be used in multiple calls to pthreadcreate(),
     with or without modifications between calls.

     The pthreadattrinit() function initializes attr with all the default
     thread attributes.

     The pthreadattrdestroy() function destroys attr.

     The pthreadattrset**() functions set the attribute that corresponds to
     each function name.

     The pthreadattrget**() functions copy the value of the attribute that
     corresponds to each function name to the location pointed to by the sec-
     ond function parameter.

RETURN VALUES
     If successful, these functions return 0.  Otherwise, an error number is
     returned to indicate the error.

ERORS
     pthreadattrinit() will fail if:

     [ENOMEM]           Out of memory.

     pthreadattrdestroy() will fail if:

     [EINVAL]           Invalid value for attr.

     pthreadattrsetstacksize() will fail if:

     [EINVAL]           stacksize is less than PTHREADSTACKMIN.

     pthreadattrsetdetachstate() will fail if:

     [EINVAL]           Invalid value for detachstate.

     pthreadattrsetinheritsched() will fail if:

     [EINVAL]           Invalid value for attr.

     pthreadattrsetschedparam() will fail if:

     [EINVAL]           Invalid value for attr.

     [ENOTSUP]          Invalid value for param.

     pthreadattrsetschedpolicy() will fail if:

     [EINVAL]           Invalid value for attr.

     [ENOTSUP]          Invalid or unsupported value for policy.

     pthreadattrsetscope() will fail if:

     [EINVAL]           Invalid value for attr.

     [ENOTSUP]          Invalid or unsupported value for contentionscope.

SEE ALSO
     pthreadcreate(3)

STANDARDS
     pthreadattrinit(), pthreadattrdestroy(), pthreadattrsetstacksize(),
     pthreadattrgetstacksize(), pthreadattrsetstackaddr(),
     pthreadattrgetstackaddr(), pthreadattrsetdetachstate(), and
     pthreadattrgetdetachstate() conform to ISO/IEC 9945-1:1996
     (``POSIX.1'')

     pthreadattrsetinheritsched(), pthreadattrgetinheritsched(),
     pthreadattrsetschedparam(), pthreadattrgetschedparam(),
     pthreadattrsetschedpolicy(), pthreadattrgetschedpolicy(),
     pthreadattrsetscope(), and pthreadattrgetscope() conform to Version 2
     of the Single UNIX Specification (``SUSv2'')

BSD                             April 28, 2000                             BSD
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™