1PTHREAD_ATTR_GETSTACKSIZE(3PP)OSIX Programmer's ManuPaTlHREAD_ATTR_GETSTACKSIZE(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       pthread_attr_getstacksize, pthread_attr_setstacksize - get and set  the
13       stacksize attribute
14

SYNOPSIS

16       #include <pthread.h>
17
18       int pthread_attr_getstacksize(const pthread_attr_t *restrict attr,
19              size_t *restrict stacksize);
20       int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize);
21
22

DESCRIPTION

24       The  pthread_attr_getstacksize()  and pthread_attr_setstacksize() func‐
25       tions, respectively, shall get and set the  thread  creation  stacksize
26       attribute in the attr object.
27
28       The  stacksize attribute shall define the minimum stack size (in bytes)
29       allocated for the created threads stack.
30

RETURN VALUE

32       Upon    successful    completion,    pthread_attr_getstacksize()    and
33       pthread_attr_setstacksize()  shall  return  a value of 0; otherwise, an
34       error number shall be returned to indicate the error.
35
36       The pthread_attr_getstacksize() function stores the stacksize attribute
37       value in stacksize if successful.
38

ERRORS

40       The pthread_attr_setstacksize() function shall fail if:
41
42       EINVAL The  value  of  stacksize  is  less  than {PTHREAD_STACK_MIN} or
43              exceeds a system-imposed limit.
44
45
46       These functions shall not return an error code of [EINTR].
47
48       The following sections are informative.
49

EXAMPLES

51       None.
52

APPLICATION USAGE

54       None.
55

RATIONALE

57       None.
58

FUTURE DIRECTIONS

60       None.
61

SEE ALSO

63       pthread_attr_destroy(), pthread_attr_getstackaddr(),  pthread_attr_get‐
64       detachstate(),   pthread_create(),   the  Base  Definitions  volume  of
65       IEEE Std 1003.1-2001, <limits.h>, <pthread.h>
66
68       Portions of this text are reprinted and reproduced in  electronic  form
69       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
70       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
71       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
72       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
73       event of any discrepancy between this version and the original IEEE and
74       The Open Group Standard, the original IEEE and The Open Group  Standard
75       is  the  referee document. The original Standard can be obtained online
76       at http://www.opengroup.org/unix/online.html .
77
78
79
80IEEE/The Open Group                  2003        PTHREAD_ATTR_GETSTACKSIZE(3P)
Impressum