1 .\" Copyright (c) 2004-2007 Apple Inc. All rights reserved.
6 .Nm pthread_attr_getstacksize ,
7 .Nm pthread_attr_setstacksize
8 .Nd thread attribute operations
10 .Fd #include <pthread.h>
12 .Fo pthread_attr_getstacksize
13 .Fa "const pthread_attr_t *restrict attr"
14 .Fa "size_t *restrict stacksize"
17 .Fo pthread_attr_setstacksize
18 .Fa "pthread_attr_t *attr"
19 .Fa "size_t stacksize"
22 Thread attributes are used to specify parameters to
24 One attribute object can be used in multiple calls to
26 with or without modifications between calls.
29 .Fn pthread_attr_setstacksize
31 .Fn pthread_attr_getstacksize ,
32 respectively, set and get the size of the stack that is to be created for the new thread. The stack size attribute is set within the
34 argument, which can subsequently be used as an argument to
37 If successful, these functions return 0.
38 Otherwise, an error number is returned to indicate the error.
39 .Fn pthread_attr_getstacksize
40 returns the stacksize attribute value in
44 .Fn pthread_attr_getstacksize
53 .Fn pthread_attr_setstacksize
64 .Dv PTHREAD_STACK_MIN .
68 is not a multiple of the system page size.
71 .Xr pthread_create 3 ,
72 .Xr pthread_attr_init 3 ,
73 .Xr pthread_attr_setstackaddr 3
75 .Fn pthread_attr_setstacksize ,
76 .Fn pthread_attr_getstacksize