Print this page
11586 NAME field in man pages should match what's installed
   1 PTHREAD_ATTR_GET_NP(3C)  Standard C Library Functions  PTHREAD_ATTR_GET_NP(3C)
   2 
   3 NAME
   4      pthread_attr_get_np - get pthread attributes of a running thread
   5 
   6 SYNOPSIS
   7      #include <pthread.h>
   8 
   9      int
  10      pthread_attr_get_np(pthread_t thread, pthread_attr_t *attr);
  11 
  12 DESCRIPTION
  13      The pthread_attr_get_np() function provides a way to get the attributes
  14      of the thread thread after it has been created.  This function is most
  15      commonly used to obtain the actual location and size of a thread's stack.
  16 
  17      The attributes pointer, attr, will be filled in with the current
  18      attributes for the thread.  The attributes should be allocated by a call
  19      to pthread_attr_init(3C) prior to calling the pthrad_attr_get_np()
  20      function.  When attr is done being used, it should be destroyed through a
  21      call to pthread_attr_destroy(3C).
  22 
  23      The attributes of the thread thread will be the same as those passed in
  24      at the time pthread_create(3C) was called (or the default set if none
  25      were specified), except that the following values will be updated:
  26 
  27      Thread Stack Size
  28              If no explicit stack size was specified, then attr will contain
  29              the actual size of the stack.
  30 
  31              If the size of the stack was specified, then it may have been
  32              changed to ensure that the required alignment of the platform is
  33              satisfied.
  34 
  35      The Stack Address
  36              If no stack address was specified, then attr will contain the
  37              actual address of the stack that the system allocated for the
  38              thread.
  39 


 134                         initialized with a call to pthread_attr_init(3C).
 135 
 136      ESRCH              No thread could be found corresponding to the
 137                         specified thread ID, thread.
 138 
 139 INTERFACE STABILITY
 140      Committed
 141 
 142 MT-LEVEL
 143      MT-Safe
 144 
 145 SEE ALSO
 146      pthread_attr_destroy(3C), pthread_attr_getdetachstate(3C),
 147      pthread_attr_getguardsize(3C), pthread_attr_getinheritsched(3C),
 148      pthread_attr_getschedparam(3C), pthread_attr_getschedpolicy(3C),
 149      pthread_attr_getscope(3C), pthread_attr_getstackaddr(3C),
 150      pthread_attr_getstacksize(3C), pthread_attr_init(3C), pthread_create(3C),
 151      pthread_detach(3C), pthread_getschedparam(3C), pthread_setschedparam(3C),
 152      attributes(5), threads(5)
 153 
 154 illumos                        February 7, 2015                        illumos
   1 PTHREAD_ATTR_GET_NP(3C)  Standard C Library Functions  PTHREAD_ATTR_GET_NP(3C)
   2 
   3 NAME
   4      pthread_attr_get_np - get pthread attributes of a running thread
   5 
   6 SYNOPSIS
   7      #include <pthread.h>
   8 
   9      int
  10      pthread_attr_get_np(pthread_t thread, pthread_attr_t *attr);
  11 
  12 DESCRIPTION
  13      The pthread_attr_get_np() function provides a way to get the attributes
  14      of the thread thread after it has been created.  This function is most
  15      commonly used to obtain the actual location and size of a thread's stack.
  16 
  17      The attributes pointer, attr, will be filled in with the current
  18      attributes for the thread.  The attributes should be allocated by a call
  19      to pthread_attr_init(3C) prior to calling the pthread_attr_get_np()
  20      function.  When attr is done being used, it should be destroyed through a
  21      call to pthread_attr_destroy(3C).
  22 
  23      The attributes of the thread thread will be the same as those passed in
  24      at the time pthread_create(3C) was called (or the default set if none
  25      were specified), except that the following values will be updated:
  26 
  27      Thread Stack Size
  28              If no explicit stack size was specified, then attr will contain
  29              the actual size of the stack.
  30 
  31              If the size of the stack was specified, then it may have been
  32              changed to ensure that the required alignment of the platform is
  33              satisfied.
  34 
  35      The Stack Address
  36              If no stack address was specified, then attr will contain the
  37              actual address of the stack that the system allocated for the
  38              thread.
  39 


 134                         initialized with a call to pthread_attr_init(3C).
 135 
 136      ESRCH              No thread could be found corresponding to the
 137                         specified thread ID, thread.
 138 
 139 INTERFACE STABILITY
 140      Committed
 141 
 142 MT-LEVEL
 143      MT-Safe
 144 
 145 SEE ALSO
 146      pthread_attr_destroy(3C), pthread_attr_getdetachstate(3C),
 147      pthread_attr_getguardsize(3C), pthread_attr_getinheritsched(3C),
 148      pthread_attr_getschedparam(3C), pthread_attr_getschedpolicy(3C),
 149      pthread_attr_getscope(3C), pthread_attr_getstackaddr(3C),
 150      pthread_attr_getstacksize(3C), pthread_attr_init(3C), pthread_create(3C),
 151      pthread_detach(3C), pthread_getschedparam(3C), pthread_setschedparam(3C),
 152      attributes(5), threads(5)
 153 
 154 illumos                         August 20, 2019                        illumos