1PTHREAD_ATTR_GETSTACKSIZE(P)POSIX Programmer's ManuaPlTHREAD_ATTR_GETSTACKSIZE(P)
2
3
4
6 pthread_attr_getstacksize, pthread_attr_setstacksize - get and set the
7 stacksize attribute
8
10 #include <pthread.h>
11
12 int pthread_attr_getstacksize(const pthread_attr_t *restrict attr,
13 size_t *restrict stacksize);
14 int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);
15
16
18 The pthread_attr_getstacksize() and pthread_attr_setstacksize() func‐
19 tions, respectively, shall get and set the thread creation stacksize
20 attribute in the attr object.
21
22 The stacksize attribute shall define the minimum stack size (in bytes)
23 allocated for the created threads stack.
24
26 Upon successful completion, pthread_attr_getstacksize() and
27 pthread_attr_setstacksize() shall return a value of 0; otherwise, an
28 error number shall be returned to indicate the error.
29
30 The pthread_attr_getstacksize() function stores the stacksize attribute
31 value in stacksize if successful.
32
34 The pthread_attr_setstacksize() function shall fail if:
35
36 EINVAL The value of stacksize is less than {PTHREAD_STACK_MIN} or
37 exceeds a system-imposed limit.
38
39
40 These functions shall not return an error code of [EINTR].
41
42 The following sections are informative.
43
45 None.
46
48 None.
49
51 None.
52
54 None.
55
57 pthread_attr_destroy() , pthread_attr_getstackaddr() ,
58 pthread_attr_getdetachstate() , pthread_create() , the Base Definitions
59 volume of IEEE Std 1003.1-2001, <limits.h>, <pthread.h>
60
62 Portions of this text are reprinted and reproduced in electronic form
63 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
64 -- Portable Operating System Interface (POSIX), The Open Group Base
65 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
66 Electrical and Electronics Engineers, Inc and The Open Group. In the
67 event of any discrepancy between this version and the original IEEE and
68 The Open Group Standard, the original IEEE and The Open Group Standard
69 is the referee document. The original Standard can be obtained online
70 at http://www.opengroup.org/unix/online.html .
71
72
73
74IEEE/The Open Group 2003 PTHREAD_ATTR_GETSTACKSIZE(P)