Print this page
11586 NAME field in man pages should match what's installed
   1 .\"
   2 .\" This file and its contents are supplied under the terms of the
   3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
   4 .\" You may only use this file in accordance with the terms of version
   5 .\" 1.0 of the CDDL.
   6 .\"
   7 .\" A full copy of the text of the CDDL should have accompanied this
   8 .\" source.  A copy of the CDDL is also available via the Internet at
   9 .\" http://www.illumos.org/license/CDDL.
  10 .\"
  11 .\"
  12 .\" Copyright 2016 Joyent, Inc.
  13 .\"
  14 .Dd Feb 07, 2015
  15 .Dt PTHREAD_ATTR_GET_NP 3C
  16 .Os
  17 .Sh NAME
  18 .Nm pthread_attr_get_np
  19 .Nd get pthread attributes of a running thread
  20 .Sh SYNOPSIS
  21 .In pthread.h
  22 .Ft int
  23 .Fo pthread_attr_get_np
  24 .Fa "pthread_t thread"
  25 .Fa "pthread_attr_t *attr"
  26 .Fc
  27 .Sh DESCRIPTION
  28 The
  29 .Fn pthread_attr_get_np
  30 function provides a way to get the attributes of the thread
  31 .Fa thread
  32 after it has been created.
  33 This function is most commonly used to obtain the actual location and size of a
  34 thread's stack.
  35 .Pp
  36 The attributes pointer,
  37 .Fa attr ,
  38 will be filled in with the current attributes for the thread.
  39 The attributes should be allocated by a call to
  40 .Xr pthread_attr_init 3C
  41 prior to calling the
  42 .Fn pthrad_attr_get_np
  43 function.
  44 When
  45 .Fa attr
  46 is done being used, it should be destroyed through a call to
  47 .Xr pthread_attr_destroy 3C .
  48 .Pp
  49 The attributes of the thread
  50 .Fa thread
  51 will be the same as those passed in at the time
  52 .Xr pthread_create 3C
  53 was called (or the default set if none were specified), except that the
  54 following values will be updated:
  55 .Bl -tag -width Sy
  56 .It Sy Thread Stack Size
  57 If no explicit stack size was specified, then
  58 .Fa attr
  59 will contain the actual size of the stack.
  60 .Pp
  61 If the size of the stack was specified, then it may have been changed to
  62 ensure that the required alignment of the platform is satisfied.


   1 .\"
   2 .\" This file and its contents are supplied under the terms of the
   3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
   4 .\" You may only use this file in accordance with the terms of version
   5 .\" 1.0 of the CDDL.
   6 .\"
   7 .\" A full copy of the text of the CDDL should have accompanied this
   8 .\" source.  A copy of the CDDL is also available via the Internet at
   9 .\" http://www.illumos.org/license/CDDL.
  10 .\"
  11 .\"
  12 .\" Copyright 2016 Joyent, Inc.
  13 .\"
  14 .Dd Aug 20, 2019
  15 .Dt PTHREAD_ATTR_GET_NP 3C
  16 .Os
  17 .Sh NAME
  18 .Nm pthread_attr_get_np
  19 .Nd get pthread attributes of a running thread
  20 .Sh SYNOPSIS
  21 .In pthread.h
  22 .Ft int
  23 .Fo pthread_attr_get_np
  24 .Fa "pthread_t thread"
  25 .Fa "pthread_attr_t *attr"
  26 .Fc
  27 .Sh DESCRIPTION
  28 The
  29 .Fn pthread_attr_get_np
  30 function provides a way to get the attributes of the thread
  31 .Fa thread
  32 after it has been created.
  33 This function is most commonly used to obtain the actual location and size of a
  34 thread's stack.
  35 .Pp
  36 The attributes pointer,
  37 .Fa attr ,
  38 will be filled in with the current attributes for the thread.
  39 The attributes should be allocated by a call to
  40 .Xr pthread_attr_init 3C
  41 prior to calling the
  42 .Fn pthread_attr_get_np
  43 function.
  44 When
  45 .Fa attr
  46 is done being used, it should be destroyed through a call to
  47 .Xr pthread_attr_destroy 3C .
  48 .Pp
  49 The attributes of the thread
  50 .Fa thread
  51 will be the same as those passed in at the time
  52 .Xr pthread_create 3C
  53 was called (or the default set if none were specified), except that the
  54 following values will be updated:
  55 .Bl -tag -width Sy
  56 .It Sy Thread Stack Size
  57 If no explicit stack size was specified, then
  58 .Fa attr
  59 will contain the actual size of the stack.
  60 .Pp
  61 If the size of the stack was specified, then it may have been changed to
  62 ensure that the required alignment of the platform is satisfied.