FreeBSD kernel kern code
kern_loginclass.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/eventhandler.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/loginclass.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/types.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/queue.h>
#include <sys/racct.h>
#include <sys/refcount.h>
#include <sys/sysproto.h>
#include <sys/systm.h>
Include dependency graph for kern_loginclass.c:

Go to the source code of this file.

Data Structures

struct  getloginclass_args
 
struct  setloginclass_args
 

Functions

 __FBSDID ("$BSDSUniX$")
 
static MALLOC_DEFINE (M_LOGINCLASS,"loginclass","loginclass structures")
 
 LIST_HEAD (SYSINIT(loginclass)
 
void loginclass_free (struct loginclass *lc)
 
struct loginclass * loginclass_find (const char *name)
 
int sys_getloginclass (struct thread *td, struct getloginclass_args *uap)
 
int sys_setloginclass (struct thread *td, struct setloginclass_args *uap)
 
void loginclass_racct_foreach (void(*callback)(struct racct *racct, void *arg2, void *arg3), void *arg2, void *arg3)
 
static void lc_init (void)
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
static void lc_init ( void  )
static

Definition at line 234 of file kern_loginclass.c.

References mtx_init().

Here is the call graph for this function:

LIST_HEAD ( SYSINIT loginclass)

Definition at line 66 of file kern_loginclass.c.

struct loginclass* loginclass_find ( const char *  name)

Definition at line 112 of file kern_loginclass.c.

References free(), lc, malloc(), racct_create(), and racct_destroy().

Referenced by proc0_init(), and sys_setloginclass().

Here is the call graph for this function:

Here is the caller graph for this function:

void loginclass_free ( struct loginclass *  lc)

Definition at line 84 of file kern_loginclass.c.

References free(), and racct_destroy().

Referenced by crfree(), sys_getloginclass(), and sys_setloginclass().

Here is the call graph for this function:

Here is the caller graph for this function:

void loginclass_racct_foreach ( void(*)(struct racct *racct, void *arg2, void *arg3)  callback,
void *  arg2,
void *  arg3 
)

Definition at line 222 of file kern_loginclass.c.

References callback, and lc.

static MALLOC_DEFINE ( M_LOGINCLASS  ,
"loginclass"  ,
"loginclass structures"   
)
static
int sys_getloginclass ( struct thread *  td,
struct getloginclass_args uap 
)

Definition at line 155 of file kern_loginclass.c.

References lc, loginclass_free(), getloginclass_args::namebuf, and getloginclass_args::namelen.

Here is the call graph for this function:

int sys_setloginclass ( struct thread *  td,
struct setloginclass_args uap 
)

Definition at line 187 of file kern_loginclass.c.

References crcopysafe(), crfree(), crget(), loginclass_find(), loginclass_free(), setloginclass_args::namebuf, and priv_check().

Here is the call graph for this function: