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