FreeBSD kernel kern code
kern_context.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/syscallsubr.h>
#include <sys/sysent.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/ucontext.h>
Include dependency graph for kern_context.c:

Go to the source code of this file.

Data Structures

struct  getcontext_args
 
struct  swapcontext_args
 

Macros

#define UC_COPY_SIZE   offsetof(ucontext_t, uc_link)
 

Functions

 __FBSDID ("$FreeBSD$")
 
struct swapcontext_args sys_getcontext (struct thread *td, struct getcontext_args *uap)
 
int sys_setcontext (struct thread *td, struct setcontext_args *uap)
 
int sys_swapcontext (struct thread *td, struct swapcontext_args *uap)
 

Variables

struct getcontext_argsucp
 
struct __ucontext * oucp
 

Macro Definition Documentation

◆ UC_COPY_SIZE

#define UC_COPY_SIZE   offsetof(ucontext_t, uc_link)

Definition at line 49 of file kern_context.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ sys_getcontext()

struct swapcontext_args sys_getcontext ( struct thread *  td,
struct getcontext_args uap 
)

Definition at line 30 of file kern_context.c.

◆ sys_setcontext()

int sys_setcontext ( struct thread *  td,
struct setcontext_args *  uap 
)

Definition at line 84 of file kern_context.c.

References kern_sigprocmask(), and UC_COPY_SIZE.

Here is the call graph for this function:

◆ sys_swapcontext()

int sys_swapcontext ( struct thread *  td,
struct swapcontext_args uap 
)

Definition at line 105 of file kern_context.c.

References kern_sigprocmask(), swapcontext_args::oucp, UC_COPY_SIZE, and swapcontext_args::ucp.

Here is the call graph for this function:

Variable Documentation

◆ oucp

struct __ucontext* oucp

Definition at line 66 of file kern_context.c.

◆ ucp

const struct __ucontext_t * ucp

Definition at line 67 of file kern_context.c.