MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Standard C Library Functions                   thrstksegment(3C)



NAME
     thrstksegment - get thread stack address and size

SYNOPSIS
     cc -mt [ flag... ] file...[ library... ]
     #include 
     #include 

     int thrstksegment(stackt *ss);


DESCRIPTION
     The thrstksegment() function returns, in its stackt  argu-
     ment, the address and size of the calling thread's stack.


     The stackt structure includes the following members:

       void   *sssp
       sizet sssize
       int    ssflags



     On successful return from thrstksegment(),  sssp  contains
     the  high address of the caller's stack and sssize contains
     the size of the stack in  bytes.   The  ssflags  member  is
     always  0.  Note  that the meaning of sssp is reversed from
     other uses of stackt such as sigaltstack(2) where sssp  is
     the low address.


     The stack information provided by thrstksegment() is  typi-
     cally  used  by  debuggers,  garbage collectors, and similar
     applications. Most  applications  should  not  require  such
     information.

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

ERORS
     The  thrstksegment() 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.






SunOS 5.11          Last change: 15 Jun 2000                    1






Standard C Library Functions                   thrstksegment(3C)



ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     sigaltstack(2), thrcreate(3C), attributes(5)








































SunOS 5.11          Last change: 15 Jun 2000                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™