MOS Source Code
Loading...
Searching...
No Matches
memfd.c File Reference
#include "mos/ipc/memfd.h"
#include "mos/filesystem/dentry.h"
#include "mos/filesystem/inode.h"
#include "mos/filesystem/vfs.h"
#include "mos/filesystem/vfs_types.h"
#include "mos/filesystem/vfs_utils.h"
#include "mos/io/io.h"
#include "mos/misc/setup.h"
#include "mos/mm/slab_autoinit.h"
#include "mos/syslog/printk.h"
#include <mos/filesystem/fs_types.h>
#include <mos_stdlib.h>
#include <stdio.h>
+ Include dependency graph for memfd.c:

Go to the source code of this file.

Classes

struct  memfd_t
 

Functions

 SLAB_AUTOINIT ("memfd", memfd_slab, memfd_t)
 
static void memfd_file_release (file_t *file)
 
io_tmemfd_create (const char *name)
 
static void memfd_init ()
 
 MOS_INIT (VFS, memfd_init)
 

Variables

filesystem_t fs_tmpfs
 
static slab_tmemfd_slab = NULL
 
static dentry_tmemfd_root_dentry = NULL
 
static const file_ops_t memfd_file_ops
 

Function Documentation

◆ SLAB_AUTOINIT()

SLAB_AUTOINIT ( "memfd" ,
memfd_slab ,
memfd_t  )

◆ memfd_file_release()

static void memfd_file_release ( file_t * file)
static

Definition at line 31 of file memfd.c.

+ Here is the call graph for this function:

◆ memfd_create()

io_t * memfd_create ( const char * name)

Definition at line 42 of file memfd.c.

+ Here is the call graph for this function:

◆ memfd_init()

static void memfd_init ( )
static

Definition at line 77 of file memfd.c.

+ Here is the call graph for this function:

◆ MOS_INIT()

MOS_INIT ( VFS ,
memfd_init  )

Variable Documentation

◆ fs_tmpfs

filesystem_t fs_tmpfs
extern

Referenced by memfd_init(), and tmpfs_fsop_mount().

◆ memfd_slab

slab_t* memfd_slab = NULL
static

Definition at line 26 of file memfd.c.

Referenced by memfd_create().

◆ memfd_root_dentry

dentry_t* memfd_root_dentry = NULL
static

Definition at line 29 of file memfd.c.

Referenced by memfd_create(), and memfd_init().

◆ memfd_file_ops

const file_ops_t memfd_file_ops
static
Initial value:
= {
.release = memfd_file_release,
}
static void memfd_file_release(file_t *file)
Definition memfd.c:31
ssize_t vfs_generic_write(const file_t *file, const void *buf, size_t size, off_t offset)
Definition vfs_utils.c:105
ssize_t vfs_generic_read(const file_t *file, void *buf, size_t size, off_t offset)
Definition vfs_utils.c:95

Definition at line 36 of file memfd.c.

Referenced by memfd_create().