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