XINU
Functions | Variables
lfsinit.c File Reference
#include <xinu.h>
Include dependency graph for lfsinit.c:

Go to the source code of this file.

Functions

devcall lfsinit (struct dentry *devptr)
 

Variables

struct lfdata Lf_data
 

Function Documentation

◆ lfsinit()

devcall lfsinit ( struct dentry devptr)

Definition at line 11 of file lfsinit.c.

References FALSE, Lf_data, lfdata::lf_dir, lfdata::lf_dirdirty, lfdata::lf_dirpresent, LF_DISK_DEV, lfdata::lf_dskdev, lfdata::lf_mutex, memset(), NULLCH, OK, and semcreate().

14 {
15  /* Assign ID of disk device that will be used */
16 
18 
19  /* Create a mutual exclusion semaphore */
20 
22 
23  /* Zero directory area (for debugging) */
24 
25  memset((char *)&Lf_data.lf_dir, NULLCH, sizeof(struct lfdir));
26 
27  /* Initialize directory to "not present" in memory */
28 
30 
31  return OK;
32 }
sid32 semcreate(int32)
未使用セマフォを割り当て、そのセマフォへのインデックス(セマフォID)を返す。
Definition: semcreate.c:22
sid32 lf_mutex
Definition: lfilesys.h:132
did32 lf_dskdev
Definition: lfilesys.h:131
#define OK
処理が成功した場合
Definition: kernel.h:77
#define LF_DISK_DEV
Definition: conf.h:86
bool8 lf_dirpresent
Definition: lfilesys.h:135
struct lfdir lf_dir
Definition: lfilesys.h:134
#define FALSE
Boolean False(0)
Definition: kernel.h:63
bool8 lf_dirdirty
Definition: lfilesys.h:137
void * memset(void *, const int, int32)
指定のByteブロックに対して、同じ値をNバイト分書き込む。
Definition: memset.c:13
struct lfdata Lf_data
Definition: lfsinit.c:5
#define NULLCH
NULL文字(NULL終端)
Definition: kernel.h:70
Here is the call graph for this function:

Variable Documentation

◆ Lf_data

struct lfdata Lf_data