PatchworkOS  3984a1d
A non-POSIX operating system.
Loading...
Searching...
No Matches
const.c File Reference
#include <kernel/fs/devfs.h>
#include <kernel/fs/vfs.h>
#include <kernel/log/log.h>
#include <kernel/log/panic.h>
#include <kernel/mem/vmm.h>
#include <kernel/module/module.h>
#include <kernel/proc/process.h>
#include <kernel/sched/sched.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for const.c:

Go to the source code of this file.

Functions

static uint64_t const_one_read (file_t *file, void *buffer, size_t count, size_t *offset)
 
static voidconst_one_mmap (file_t *file, void *addr, size_t length, size_t *offset, pml_flags_t flags)
 
static uint64_t const_zero_read (file_t *file, void *buffer, size_t count, size_t *offset)
 
static voidconst_zero_mmap (file_t *file, void *addr, size_t length, size_t *offset, pml_flags_t flags)
 
static uint64_t const_null_read (file_t *file, void *buffer, size_t count, size_t *offset)
 
static uint64_t const_null_write (file_t *file, const void *buffer, size_t count, size_t *offset)
 
static uint64_t const_init (void)
 
static void const_deinit (void)
 
uint64_t _module_procedure (const module_event_t *event)
 
 MODULE_INFO ("Const Driver", "Kai Norberg", "A constant device driver", OS_VERSION, "MIT", "BOOT_ALWAYS")
 

Variables

static dentry_tconstDir
 
static dentry_toneFile
 
static dentry_tzeroFile
 
static dentry_tnullFile
 
static file_ops_t oneOps
 
static file_ops_t zeroOps
 
static file_ops_t nullOps
 

Function Documentation

◆ _module_procedure()

uint64_t _module_procedure ( const module_event_t event)

Definition at line 164 of file const.c.

Here is the call graph for this function:

◆ MODULE_INFO()

MODULE_INFO ( "Const Driver"  ,
"Kai Norberg"  ,
"A constant device driver"  ,
OS_VERSION  ,
"MIT"  ,
"BOOT_ALWAYS"   
)