Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ thr_stksegment(3T) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

thr_create(3T)

attributes(5)

thr_stksegment(3T)

NAME

thr_stksegment − get thread stack bottom and stack size

SYNOPSIS

cc [ flag ... ] file ... −lthread [ library ... ]

#include <thread.h>

#include <sys/signal.h>

int thr_stksegment(stack_t∗);

DESCRIPTION

The stack information provided by thr_stksegment() is typically used by debuggers, garbage collectors, and similar applications.  Most applications should not require such information.  The bottom of the thread stack returned by thr_stksegment() points to a part of the stack which may contain data maintained by libthread.  The user’s thread stack starts at a point below the bottom of the stack as returned by thr_stksegment().

RETURN VALUES

thr_stksegment() returns 0 if both the thread stack bottom and stack size were successfully retrieved; otherwise, it returns a non-zero error code. 

ERRORS

If any of the following conditions are detected, thr_stksegment() fails and returns the corresponding value:

EFAULT A system call used to get the stack information failed because a bad address was passed to it. 

EAGAIN The stack information for the thread is not available because the thread’s initialization is not yet complete, or the thread is an internal thread. 

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe

SEE ALSO

thr_create(3T), attributes(5)

SunOS 5.6  —  Last change: 30 Dec 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026