logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

pthread_attr_getstacksize.3p (3387B)


  1. '\" et
  2. .TH PTHREAD_ATTR_GETSTACKSIZE "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. .ad l
  12. pthread_attr_getstacksize,
  13. pthread_attr_setstacksize
  14. \(em get and set the stacksize attribute
  15. .ad b
  16. .SH SYNOPSIS
  17. .LP
  18. .nf
  19. #include <pthread.h>
  20. .P
  21. int pthread_attr_getstacksize(const pthread_attr_t *restrict \fIattr\fP,
  22. size_t *restrict \fIstacksize\fP);
  23. int pthread_attr_setstacksize(pthread_attr_t *\fIattr\fP, size_t \fIstacksize\fP);
  24. .fi
  25. .SH DESCRIPTION
  26. The
  27. \fIpthread_attr_getstacksize\fR()
  28. and
  29. \fIpthread_attr_setstacksize\fR()
  30. functions, respectively, shall get and set the thread creation
  31. .IR stacksize
  32. attribute in the
  33. .IR attr
  34. object.
  35. .P
  36. The
  37. .IR stacksize
  38. attribute shall define the minimum stack size (in bytes) allocated
  39. for the created threads stack.
  40. .P
  41. The behavior is undefined if the value specified by the
  42. .IR attr
  43. argument to
  44. \fIpthread_attr_getstacksize\fR()
  45. or
  46. \fIpthread_attr_setstacksize\fR()
  47. does not refer to an initialized thread attributes object.
  48. .SH "RETURN VALUE"
  49. Upon successful completion,
  50. \fIpthread_attr_getstacksize\fR()
  51. and
  52. \fIpthread_attr_setstacksize\fR()
  53. shall return a value of 0; otherwise, an error number shall be
  54. returned to indicate the error.
  55. .P
  56. The
  57. \fIpthread_attr_getstacksize\fR()
  58. function stores the
  59. .IR stacksize
  60. attribute value in
  61. .IR stacksize
  62. if successful.
  63. .SH ERRORS
  64. The
  65. \fIpthread_attr_setstacksize\fR()
  66. function shall fail if:
  67. .TP
  68. .BR EINVAL
  69. The value of
  70. .IR stacksize
  71. is less than
  72. {PTHREAD_STACK_MIN}
  73. or exceeds a system-imposed limit.
  74. .P
  75. These functions shall not return an error code of
  76. .BR [EINTR] .
  77. .LP
  78. .IR "The following sections are informative."
  79. .SH EXAMPLES
  80. None.
  81. .SH "APPLICATION USAGE"
  82. None.
  83. .SH RATIONALE
  84. If an implementation detects that the value specified by the
  85. .IR attr
  86. argument to
  87. \fIpthread_attr_getstacksize\fR()
  88. or
  89. \fIpthread_attr_setstacksize\fR()
  90. does not refer to an initialized thread attributes object, it is
  91. recommended that the function should fail and report an
  92. .BR [EINVAL]
  93. error.
  94. .SH "FUTURE DIRECTIONS"
  95. None.
  96. .SH "SEE ALSO"
  97. .IR "\fIpthread_attr_destroy\fR\^(\|)",
  98. .IR "\fIpthread_attr_getdetachstate\fR\^(\|)",
  99. .IR "\fIpthread_create\fR\^(\|)"
  100. .P
  101. The Base Definitions volume of POSIX.1\(hy2017,
  102. .IR "\fB<limits.h>\fP",
  103. .IR "\fB<pthread.h>\fP"
  104. .\"
  105. .SH COPYRIGHT
  106. Portions of this text are reprinted and reproduced in electronic form
  107. from IEEE Std 1003.1-2017, Standard for Information Technology
  108. -- Portable Operating System Interface (POSIX), The Open Group Base
  109. Specifications Issue 7, 2018 Edition,
  110. Copyright (C) 2018 by the Institute of
  111. Electrical and Electronics Engineers, Inc and The Open Group.
  112. In the event of any discrepancy between this version and the original IEEE and
  113. The Open Group Standard, the original IEEE and The Open Group Standard
  114. is the referee document. The original Standard can be obtained online at
  115. http://www.opengroup.org/unix/online.html .
  116. .PP
  117. Any typographical or formatting errors that appear
  118. in this page are most likely
  119. to have been introduced during the conversion of the source files to
  120. man page format. To report such errors, see
  121. https://www.kernel.org/doc/man-pages/reporting_bugs.html .