11 if (superblock ==
NULL)
39 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(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.
void rwlock_write_acquire(rwlock_t *lock)
Acquires a rwlock for writing, blocking until it is available.
void rwlock_write_release(rwlock_t *lock)
Releases a rwlock from writing.
static void ref_init(ref_t *ref, void *free)
Initialize a reference counter.
#define UNREF(ptr)
Decrement reference count.
uint64_t vfs_id_get(void)
Generates a new unique ID, to be used for any VFS object.
static void list_remove(list_t *list, list_entry_t *entry)
Removes a list entry from its current list.
static void list_entry_init(list_entry_t *entry)
Initializes a list entry.
#define PAGE_SIZE
The size of a memory page in bytes.
#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.
rwlock_t lock
Used internally.
list_t superblocks
Used internally.
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)