1
2SWAPCONTEXT(2)           Linux 2.6 Programmer's Guide           SWAPCONTEXT(2)
3
4
5

NAME

7       swapcontext - Swap out old context with new context
8

SYNOPSIS

10       int sys_swapcontext (struct ucontext *old_ctx,
11                            struct ucontext *new_ctx, int r5, int r6, int r7,
12                            int r8, struct pt_regs *regs);
13
14

DESCRIPTION

16       swapcontext swaps out context old_ctx with new context new_ctx. The int
17       r# values have no place in the system call functionality. The regs val‐
18       ue indicates the current user register values from the user stack.
19
20

RETURN VALUE

22       swapcontext returns 0 on success; otherwise, swapcontext returns one of
23       the errors listed in the "Errors" section.
24
25

ERRORS

27       -EFAULT
28              swapcontext could not verify that the memory area pointed to  by
29              old_ctx or new_ctx was accessible for the operation.
30
31
32       -SIGSEGV
33              A fault occurred when the context was being copied into the ker‐
34              nel's image of the user's registers. The should only occur in an
35              out-of-memory situation.
36
37

SEE ALSO

39       getcontext(2), sigaction(2), sigaltstack(2), sigprocmask(2)
40
41
42

AUTHOR

44       Niki Rahimi
45
46
47
48Linux 2.6                        2004-March-12                  SWAPCONTEXT(2)
Impressum