| Main index | Section 3 | Options |
#include <ucontext.h>
The ucp->uc_link argument must be initialized before calling makecontext() and determines the action to take when func() returns: if equal to NULL, the process exits; otherwise, setcontext(ucp->uc_link) is implicitly invoked.
The swapcontext() function saves the current thread context in *oucp and makes *ucp the currently active context.
| [ENOMEM] | |
| There is not enough stack space in ucp to complete the operation. | |
The IEEE Std 1003.1-2004 ("POSIX.1") revision marked the functions makecontext() and swapcontext() as obsolete, citing portability issues and recommending the use of POSIX threads instead. The IEEE Std 1003.1-2008 ("POSIX.1") revision removed the functions from the specification.
The standard does not clearly define the type of integer arguments passed to func via makecontext(); portable applications should not rely on the implementation detail that it may be possible to pass pointer arguments to functions.
| MAKECONTEXT (3) | March 23, 2020 |
| Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | The number of UNIX installations has grown to 10, with more expected. | ” |
| — UNIX Programming Manual, 1972 | ||