1*353247b6Sguenther.\" $OpenBSD: pthread_stackseg_np.3,v 1.7 2023/02/22 06:43:45 guenther Exp $ 253ae0483Smarc.\" 353ae0483Smarc.\" PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> 453ae0483Smarc.\" 5*353247b6Sguenther.Dd $Mdocdate: February 22 2023 $ 653ae0483Smarc.Dt PTHREAD_STACKSEG_NP 3 753ae0483Smarc.Os 853ae0483Smarc.Sh NAME 953ae0483Smarc.Nm pthread_stackseg_np 1053ae0483Smarc.Nd return stack size and location 1153ae0483Smarc.Sh SYNOPSIS 1286f9d4cdStedu.In pthread_np.h 1353ae0483Smarc.Ft int 14e4f7614aSmarc.Fn pthread_stackseg_np "pthread_t thread" "stack_t *sinfo" 1553ae0483Smarc.Sh DESCRIPTION 1653ae0483SmarcThe 1753ae0483Smarc.Fn pthread_stackseg_np 18e4f7614aSmarcfunction returns information about the given thread's stack. 1953ae0483SmarcA 2053ae0483Smarc.Fa stack_t 2153ae0483Smarcis the same as a 2253ae0483Smarc.Fa struct sigaltstack 2319a1d8faSjmc(see 2419a1d8faSjmc.Xr sigaltstack 2 ) 2553ae0483Smarcexcept the 2653ae0483Smarc.Fa ss_sp 2753ae0483Smarcvariable points to the top of the stack instead of the base. 2853ae0483Smarc.Sh RETURN VALUES 2953ae0483SmarcIf successful, the 3053ae0483Smarc.Fn pthread_stackseg_np 3153ae0483Smarcfunction will return 0. 3253ae0483SmarcOtherwise an error number will be returned to indicate the error. 3353ae0483Smarc.Sh ERRORS 3453ae0483SmarcThe 3553ae0483Smarc.Fn pthread_stackseg_np 3653ae0483Smarcfunction will fail if: 3753ae0483Smarc.Bl -tag -width Er 3853ae0483Smarc.It Bq Er EAGAIN 39e4f7614aSmarcStack information for the given thread is not currently available. 40e4f7614aSmarcThere is no guarantee that the given thread's stack information will ever 4153ae0483Smarcbecome available. 4253ae0483Smarc.El 4353ae0483Smarc.Sh SEE ALSO 4419a1d8faSjmc.Xr sigaltstack 2 , 4519a1d8faSjmc.Xr pthreads 3 4653ae0483Smarc.Sh STANDARDS 4753ae0483Smarc.Fn pthread_stackseg_np 4853ae0483Smarcis a non-portable extension to 497a5684e3Sjmc.St -p1003.1-2001 . 50