blob: d95ca312ec56766742a334708d20e2c7926075b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
.\" $OpenBSD: pthread_stackseg_np.3,v 1.5 2007/05/31 19:19:37 jmc Exp $
.\"
.\" PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org>
.\"
.Dd $Mdocdate: May 31 2007 $
.Dt PTHREAD_STACKSEG_NP 3
.Os
.Sh NAME
.Nm pthread_stackseg_np
.Nd return stack size and location
.Sh SYNOPSIS
.Fd #include <sys/signal.h>
.Fd #include <pthread_np.h>
.Ft int
.Fn pthread_stackseg_np "pthread_t thread" "stack_t *sinfo"
.Sh DESCRIPTION
The
.Fn pthread_stackseg_np
function returns information about the given thread's stack.
A
.Fa stack_t
is the same as a
.Fa struct sigaltstack
(see
.Xr sigaltstack 2 )
except the
.Fa ss_sp
variable points to the top of the stack instead of the base.
.Sh RETURN VALUES
If successful, the
.Fn pthread_stackseg_np
function will return 0.
Otherwise an error number will be returned to indicate the error.
.Sh ERRORS
The
.Fn pthread_stackseg_np
function will fail if:
.Bl -tag -width Er
.It Bq Er EAGAIN
Stack information for the given thread is not currently available.
There is no guarantee that the given thread's stack information will ever
become available.
.El
.Sh SEE ALSO
.Xr sigaltstack 2 ,
.Xr pthreads 3
.Sh STANDARDS
.Fn pthread_stackseg_np
is a non-portable extension to
.St -p1003.1-2001 .
|