PatchworkOS  3984a1d
A non-POSIX operating system.
Loading...
Searching...
No Matches
shmem.c File Reference
#include <kernel/fs/ctl.h>
#include <kernel/fs/devfs.h>
#include <kernel/fs/vfs.h>
#include <kernel/log/log.h>
#include <kernel/log/panic.h>
#include <kernel/mem/pmm.h>
#include <kernel/mem/vmm.h>
#include <kernel/module/module.h>
#include <kernel/proc/process.h>
#include <kernel/sched/sched.h>
#include <kernel/sync/lock.h>
#include <kernel/utils/ref.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/list.h>
Include dependency graph for shmem.c:

Go to the source code of this file.

Data Structures

struct  shmem_object_t
 Represents a shared memory object. More...
 

Functions

static void shmem_object_free (shmem_object_t *shmem)
 
static shmem_object_tshmem_object_new (void)
 
static void shmem_vmm_callback (void *private)
 
static voidshmem_object_allocate_pages (shmem_object_t *shmem, uint64_t pageAmount, space_t *space, void *address, pml_flags_t flags)
 
static uint64_t shmem_open (file_t *file)
 
static void shmem_close (file_t *file)
 
static voidshmem_mmap (file_t *file, void *address, size_t length, size_t *offset, pml_flags_t flags)
 
static uint64_t shmem_init (void)
 
static void shmem_deinit (void)
 
uint64_t _module_procedure (const module_event_t *event)
 
 MODULE_INFO ("Shared Memory", "Kai Norberg", "Implements shared memory for inter-process communication", OS_VERSION, "MIT", "BOOT_ALWAYS")
 

Variables

static dentry_tshmemDir = NULL
 
static dentry_tnewFile = NULL
 
static file_ops_t fileOps
 

Function Documentation

◆ _module_procedure()

uint64_t _module_procedure ( const module_event_t event)

Definition at line 259 of file shmem.c.

Here is the call graph for this function:

◆ MODULE_INFO()

MODULE_INFO ( "Shared Memory"  ,
"Kai Norberg"  ,
"Implements shared memory for inter-process communication"  ,
OS_VERSION  ,
"MIT"  ,
"BOOT_ALWAYS"   
)