summaryrefslogtreecommitdiffstats
path: root/man3/pthread_attr_setstack.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/pthread_attr_setstack.3')
-rw-r--r--man3/pthread_attr_setstack.321
1 files changed, 10 insertions, 11 deletions
diff --git a/man3/pthread_attr_setstack.3 b/man3/pthread_attr_setstack.3
index 78c2ff4..1cf976b 100644
--- a/man3/pthread_attr_setstack.3
+++ b/man3/pthread_attr_setstack.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setstack 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH pthread_attr_setstack 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
pthread_attr_setstack, pthread_attr_getstack \- set/get stack
attributes in thread attributes object
@@ -14,7 +14,7 @@ POSIX threads library
.SH SYNOPSIS
.nf
.B #include <pthread.h>
-.PP
+.P
.BI "int pthread_attr_setstack(pthread_attr_t *" attr ,
.BI " void " stackaddr [. stacksize ],
.BI " size_t " stacksize );
@@ -22,12 +22,12 @@ POSIX threads library
.BI " void **restrict " stackaddr ,
.BI " size_t *restrict " stacksize );
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR pthread_attr_getstack (),
.BR pthread_attr_setstack ():
.nf
@@ -47,13 +47,13 @@ respectively.
These attributes specify the location and size of the stack that should
be used by a thread that is created using the thread attributes object
.IR attr .
-.PP
+.P
.I stackaddr
should point to the lowest addressable byte of a buffer of
.I stacksize
bytes that was allocated by the caller.
The pages of the allocated buffer should be both readable and writable.
-.PP
+.P
The
.BR pthread_attr_getstack ()
function returns the stack address and stack size attributes of the
@@ -81,7 +81,7 @@ On some systems, this error may also occur if
or
.I stackaddr\~+\~stacksize
is not suitably aligned.
-.PP
+.P
POSIX.1 also documents an
.B EACCES
error if the stack area described by
@@ -104,7 +104,6 @@ T{
.BR pthread_attr_getstack ()
T} Thread safety MT-Safe
.TE
-.sp 1
.SH STANDARDS
POSIX.1-2008.
.SH HISTORY
@@ -118,7 +117,7 @@ and the use of these functions should be avoided.
(Use
.BR pthread_attr_setstacksize (3)
if an application simply requires a stack size other than the default.)
-.PP
+.P
When an application employs
.BR pthread_attr_setstack (),
it takes over the responsibility of allocating the stack.
@@ -129,7 +128,7 @@ If deemed necessary,
it is the application's responsibility to allocate a guard area
(one or more pages protected against reading and writing)
to handle the possibility of stack overflow.
-.PP
+.P
The address specified in
.I stackaddr
should be suitably aligned:
@@ -140,7 +139,7 @@ may be useful for allocation.
Probably,
.I stacksize
should also be a multiple of the system page size.
-.PP
+.P
If
.I attr
is used to create multiple threads, then the caller must change the