10 if (superblock ==
NULL)
36 if (superblock ==
NULL)
#define MAX_NAME
Maximum length of names.
#define assert(expression)
void superblock_inc_mount_count(superblock_t *superblock)
Increment the mount count of a superblock.
superblock_t * superblock_new(const filesystem_t *fs, const char *deviceName, const superblock_ops_t *ops, const dentry_ops_t *dentryOps)
Create a new superblock.
void superblock_dec_mount_count(superblock_t *superblock)
Decrement the mount count of a superblock.
uint64_t vfs_get_new_id(void)
Generates a new unique ID.
void vfs_remove_superblock(superblock_t *superblock)
Remove a superblock from the superblock list.
static void ref_init(ref_t *ref, void *free)
Initialize a reference counter.
#define DEREF(ptr)
Decrement reference count.
static void list_entry_init(list_entry_t *entry)
Initializes a list entry.
#define PAGE_SIZE
Memory page size.
#define NULL
Pointer error value.
static socket_family_ops_t ops
static dentry_ops_t dentryOps
#define atomic_fetch_sub(object, operand)
#define atomic_load(object)
#define atomic_fetch_add(object, operand)
#define atomic_init(obj, value)
_PUBLIC void * malloc(size_t size)
_PUBLIC void free(void *ptr)
_PUBLIC char * strncpy(char *_RESTRICT s1, const char *_RESTRICT s2, size_t n)
Dentry operations structure.
Filesystem structure, represents a filesystem type, e.g. fat32, ramfs, sysfs, etc.
Superblock operations structure.
void(* cleanup)(superblock_t *superblock)
void(* unmount)(superblock_t *superblock)
const superblock_ops_t * ops
atomic_uint64_t mountCount
const dentry_ops_t * dentryOps
char deviceName[MAX_NAME]
static void superblock_free(superblock_t *superblock)