1getustack(2)                     System Calls                     getustack(2)
2
3
4

NAME

6       getustack,  setustack - retrieve or change the address of per-LWP stack
7       boundary information
8

SYNOPSIS

10       #include <ucontext.h>
11
12       int getustack(stack_t **spp);
13
14
15       int setustack(stack_t *sp);
16
17

DESCRIPTION

19       The getustack() function retrieves the address of per-LWP stack  bound‐
20       ary  information.   The address is stored at the location pointed to by
21       spp. If this address has not been defined  using  a  previous  call  to
22       setustack(), NULL is stored at the location pointed to by spp.
23
24
25       The  setustack()  function  changes the address of the current thread's
26       stack boundary information to the value of sp.
27

RETURN VALUES

29       Upon successful completion, these functions return 0. Otherwise, −1  is
30       returned and errno is set to indicate the error.
31

ERRORS

33       These functions will fail if:
34
35       EFAULT    The spp or sp argument does not refer to a valid address.
36
37

USAGE

39       Only  implementors of custom threading libraries should use these func‐
40       tions to get and set the address of the stack bound to an internal per-
41       thread  data  structure. Other users should use stack_getbounds(3C) and
42       stack_setbounds(3C).
43

ATTRIBUTES

45       See attributes(5) for descriptions of the following attributes:
46
47
48
49
50       ┌────────────────────────────────────────────────────────┬───────────────────┐
51       │                    ATTRIBUTE TYPE                      │  ATTRIBUTE VALUE  │
52       ├────────────────────────────────────────────────────────┼───────────────────┤
53       │Interface Stability                                     │ Evolving          │
54       ├────────────────────────────────────────────────────────┼───────────────────┤
55       │MT-Level                                                │ Async-Signal-Safe │
56       └────────────────────────────────────────────────────────┴───────────────────┘
57

SEE ALSO

59       _stack_grow(3C),  stack_getbounds(3C),  stack_inbounds(3C),  stack_set‐
60       bounds(3C), stack_violation(3C), attributes(5)
61
62
63
64SunOS 5.11                        2 Nov 2004                      getustack(2)
Impressum