FreeBSD kernel kern code
tty_tty.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/eventhandler.h>
#include <sys/conf.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/sx.h>
#include <sys/vnode.h>
#include <fs/devfs/devfs.h>
#include <fs/devfs/devfs_int.h>
Include dependency graph for tty_tty.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
static int cttyopen (struct cdev *dev, int flag, int mode, struct thread *td)
 
static void ctty_clone (void *arg, struct ucred *cred, char *name, int namelen, struct cdev **dev)
 
static void ctty_drvinit (void *unused)
 
 SYSINIT (cttydev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, ctty_drvinit, NULL)
 

Variables

static d_open_t cttyopen
 
static struct cdevsw ctty_cdevsw
 
static struct cdev * ctty
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ ctty_clone()

static void ctty_clone ( void *  arg,
struct ucred *  cred,
char *  name,
int  namelen,
struct cdev **  dev 
)
static

Definition at line 61 of file tty_tty.c.

References ctty, dev_refl(), dev_unlock(), name, and proctree_lock.

Referenced by ctty_drvinit().

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

◆ ctty_drvinit()

static void ctty_drvinit ( void *  unused)
static

Definition at line 91 of file tty_tty.c.

References ctty, ctty_cdevsw, ctty_clone(), and make_dev_credf().

Here is the call graph for this function:

◆ cttyopen()

static int cttyopen ( struct cdev *  dev,
int  flag,
int  mode,
struct thread *  td 
)
static

Definition at line 54 of file tty_tty.c.

◆ SYSINIT()

SYSINIT ( cttydev  ,
SI_SUB_DRIVERS  ,
SI_ORDER_MIDDLE  ,
ctty_drvinit  ,
NULL   
)

Variable Documentation

◆ ctty

struct cdev* ctty
static

Definition at line 51 of file tty_tty.c.

Referenced by ctty_clone(), and ctty_drvinit().

◆ ctty_cdevsw

struct cdevsw ctty_cdevsw
static
Initial value:
= {
.d_version = D_VERSION,
.d_open = cttyopen,
.d_name = "ctty",
}
static d_open_t cttyopen
Definition: tty_tty.c:43

Definition at line 45 of file tty_tty.c.

Referenced by ctty_drvinit().

◆ cttyopen

d_open_t cttyopen
static

Definition at line 43 of file tty_tty.c.