#include <stdint.h>
#include <signal.h>
Go to the source code of this file.
◆ getcontext
| #define getcontext |
( |
|
ctx | ) |
(getmcontext(&(ctx)->uc_mcontext)) |
◆ setcontext
| #define setcontext |
( |
|
ctx | ) |
(setmcontext(&(ctx)->uc_mcontext)) |
◆ getmcontext()
Get machine context.
- Parameters
-
- Returns
- 0 when context is saved, 1 when context is restored.
◆ makecontext()
| void makecontext |
( |
ucontext_t * |
ctx, |
|
|
void(*)() |
func, |
|
|
int |
argc, |
|
|
|
... |
|
) |
| |
Make user context.
(TODO: Make context issues)
- Parameters
-
| ctx | User context. |
| func | Function to run. |
| argc | Number of arguments. |
◆ setmcontext()
Set machine context.
- Parameters
-
- Returns
- This function does not actually return.
◆ swapcontext()
Swap user context.
- Parameters
-
| octx | Old user context to save. |
| ctx | User context to restore. |