1stack_setbounds(3C) Standard C Library Functions stack_setbounds(3C)
2
3
4
6 stack_setbounds - update stack boundaries
7
9 #include <ucontext.h>
10
11 int stack_setbounds(const stack_t *sp);
12
13
15 The stack_setbounds() function updates the current base and bounds of
16 the stack for the current thread to the bounds specified by the stack_t
17 structure pointed to by sp. The ss_sp member refers to the virtual
18 address of the base of the stack memory. The ss_size member refers to
19 the size of the stack in bytes. The ss_flags member must be set to 0.
20
22 Upon successful completion, stack_setbounds() returns 0. Otherwise, −1
23 is returned and errno is set to indicate the error.
24
26 The stack_setbounds() function will fail if:
27
28 EFAULT The sp argument does not refer to a valid address or the
29 ss_sp member of the stack_t structure pointed to by sp points
30 to an illegal address.
31
32
33 EINVAL The ss_sp member of the stack_t structure pointed to by sp is
34 not properly aligned, the ss_size member is too small or is
35 not properly aligned, or the ss_flags member is non-zero.
36
37
39 The stack_setbounds() function is intended for use by applications that
40 are managing their own alternate stacks.
41
43 See attributes(5) for descriptions of the following attributes:
44
45
46
47
48 ┌─────────────────────────────┬─────────────────────────────┐
49 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
50 ├─────────────────────────────┼─────────────────────────────┤
51 │Interface Stability │Evolving │
52 ├─────────────────────────────┼─────────────────────────────┤
53 │MT-Level │Async-Signal-Safe │
54 └─────────────────────────────┴─────────────────────────────┘
55
57 getustack(2), _stack_grow(3C), stack_getbounds(3C), stack_inbounds(3C),
58 stack_violation(3C), attributes(5)
59
60
61
62SunOS 5.11 18 Jul 2002 stack_setbounds(3C)