FreeBSD kernel kern code
kern_syscalls.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/sx.h>
#include <sys/syscall.h>
#include <sys/sysent.h>
#include <sys/sysproto.h>
#include <sys/systm.h>
#include <machine/atomic.h>
Include dependency graph for kern_syscalls.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
int lkmnosys (struct thread *td, struct nosys_args *args)
 
int lkmressys (struct thread *td, struct nosys_args *args)
 
static void syscall_thread_drain (struct sysent *se)
 
int syscall_thread_enter (struct thread *td, struct sysent *se)
 
void syscall_thread_exit (struct thread *td, struct sysent *se)
 
int kern_syscall_register (struct sysent *sysents, int *offset, struct sysent *new_sysent, struct sysent *old_sysent, int flags)
 
int kern_syscall_deregister (struct sysent *sysents, int offset, const struct sysent *old_sysent)
 
int syscall_module_handler (struct module *mod, int what, void *arg)
 
int kern_syscall_module_handler (struct sysent *sysents, struct module *mod, int what, void *arg)
 
int syscall_helper_register (struct syscall_helper_data *sd, int flags)
 
int kern_syscall_helper_register (struct sysent *sysents, struct syscall_helper_data *sd, int flags)
 
int syscall_helper_unregister (struct syscall_helper_data *sd)
 
int kern_syscall_helper_unregister (struct sysent *sysents, struct syscall_helper_data *sd)
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ kern_syscall_deregister()

int kern_syscall_deregister ( struct sysent sysents,
int  offset,
const struct sysent old_sysent 
)

Definition at line 148 of file kern_syscalls.c.

References syscall_thread_drain(), and sysent.

Referenced by kern_syscall_helper_unregister(), and kern_syscall_module_handler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_syscall_helper_register()

int kern_syscall_helper_register ( struct sysent sysents,
struct syscall_helper_data *  sd,
int  flags 
)

Definition at line 228 of file kern_syscalls.c.

References flags, kern_syscall_helper_unregister(), and kern_syscall_register().

Referenced by syscall_helper_register().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_syscall_helper_unregister()

int kern_syscall_helper_unregister ( struct sysent sysents,
struct syscall_helper_data *  sd 
)

Definition at line 254 of file kern_syscalls.c.

References kern_syscall_deregister().

Referenced by kern_syscall_helper_register(), and syscall_helper_unregister().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_syscall_module_handler()

int kern_syscall_module_handler ( struct sysent sysents,
struct module mod,
int  what,
void *  arg 
)

Definition at line 172 of file kern_syscalls.c.

References data, kern_syscall_deregister(), kern_syscall_register(), and module_setspecific().

Referenced by syscall_module_handler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kern_syscall_register()

int kern_syscall_register ( struct sysent sysents,
int *  offset,
struct sysent new_sysent,
struct sysent old_sysent,
int  flags 
)

Definition at line 114 of file kern_syscalls.c.

References flags, lkmnosys(), and lkmressys().

Referenced by kern_syscall_helper_register(), and kern_syscall_module_handler().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lkmnosys()

int lkmnosys ( struct thread *  td,
struct nosys_args args 
)

Definition at line 53 of file kern_syscalls.c.

References nosys().

Referenced by kern_syscall_register().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lkmressys()

int lkmressys ( struct thread *  td,
struct nosys_args args 
)

Definition at line 60 of file kern_syscalls.c.

References nosys().

Referenced by kern_syscall_register().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syscall_helper_register()

int syscall_helper_register ( struct syscall_helper_data *  sd,
int  flags 
)

Definition at line 221 of file kern_syscalls.c.

References flags, kern_syscall_helper_register(), and sysent.

Referenced by ksem_module_init(), mqinit(), msginit(), seminit(), and shminit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syscall_helper_unregister()

int syscall_helper_unregister ( struct syscall_helper_data *  sd)

Definition at line 247 of file kern_syscalls.c.

References kern_syscall_helper_unregister(), and sysent.

Referenced by ksem_module_destroy(), mqunload(), msgunload(), semunload(), and shmunload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ syscall_module_handler()

int syscall_module_handler ( struct module mod,
int  what,
void *  arg 
)

Definition at line 165 of file kern_syscalls.c.

References kern_syscall_module_handler(), and sysent.

Here is the call graph for this function:

◆ syscall_thread_drain()

static void syscall_thread_drain ( struct sysent se)
static

Definition at line 67 of file kern_syscalls.c.

References hz.

Referenced by kern_syscall_deregister().

Here is the caller graph for this function:

◆ syscall_thread_enter()

int syscall_thread_enter ( struct thread *  td,
struct sysent se 
)

Definition at line 83 of file kern_syscalls.c.

Referenced by syscallenter().

Here is the caller graph for this function:

◆ syscall_thread_exit()

void syscall_thread_exit ( struct thread *  td,
struct sysent se 
)

Definition at line 100 of file kern_syscalls.c.

Referenced by syscallenter().

Here is the caller graph for this function: