thr_stksegment man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

THR_STKSEGMENT(3C)					    THR_STKSEGMENT(3C)

NAME
       thr_stksegment - get thread stack address and size

SYNOPSIS
       cc -mt [ flag... ] file...[ library... ]
       #include <thread.h>
       #include <signal.h>

       int thr_stksegment(stack_t *ss);

DESCRIPTION
       The  thr_stksegment()  function	returns,  in its stack_t argument, the
       address and size of the calling thread's stack.

       The stack_t structure includes the following members:

	 void	*ss_sp
	 size_t ss_size
	 int	ss_flags

       On successful return from thr_stksegment(),  ss_sp  contains  the  high
       address	of  the	 caller's  stack  and ss_size contains the size of the
       stack in bytes.	The ss_flags member is always 0. Note that the meaning
       of  ss_sp is reversed from other uses of stack_t such as sigaltstack(2)
       where ss_sp is the low address.

       The stack information provided by thr_stksegment() is typically used by
       debuggers,  garbage collectors, and similar applications. Most applica‐
       tions should not require such information.

RETURN VALUES
       The  thr_stksegment() function returns  0 if the thread	stack  address
       and size were successfully retrieved.  Otherwise, it returns a non-zero
       error value.

ERRORS
       The  thr_stksegment() function will fail if:

       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
       sigaltstack(2), thr_create(3C), attributes(5)

				 Jun 15, 2000		    THR_STKSEGMENT(3C)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net