#define MAX_NAME
Maximum length of names.
static rwlock_t filesystemsLock
static map_key_t filesystem_key(const char *name)
filesystem_t * filesystem_get(const char *name)
Gets a filesystem by name.
uint64_t filesystem_register(filesystem_t *fs)
Registers a filesystem.
void filesystem_unregister(filesystem_t *fs)
Unregisters a filesystem.
#define RWLOCK_READ_SCOPE(lock)
Acquires a rwlock for reading for the reminder of the current scope.
void rwlock_init(rwlock_t *lock)
Initializes a rwlock.
#define RWLOCK_CREATE()
Create a rwlock initializer.
#define RWLOCK_WRITE_SCOPE(lock)
Acquires a rwlock for writing for the reminder of the current scope.
void map_entry_init(map_entry_t *entry)
Initialize a map entry.
uint64_t map_insert(map_t *map, const map_key_t *key, map_entry_t *value)
Insert a key-value pair into the map.
void map_remove(map_t *map, map_entry_t *entry)
Remove a entry from the map.
map_entry_t * map_get(map_t *map, const map_key_t *key)
Get a value from the map by key.
static map_key_t map_key_string(const char *str)
Create a map key from a string.
#define MAP_CREATE()
Create a map initializer.
#define EINVAL
Invalid argument.
#define errno
Error number variable.
static list_entry_t * list_pop_first(list_t *list)
Pops the first entry from the list.
static bool list_is_empty(list_t *list)
Checks if a list is empty.
static void list_init(list_t *list)
Initializes a list.
#define NULL
Pointer error value.
#define ERR
Integer error value.
#define CONTAINER_OF_SAFE(ptr, type, member)
Safe container of macro.
size_t strnlen_s(const char *s, size_t maxsize)
Filesystem structure, represents a filesystem type, e.g. fat32, ramfs, sysfs, etc.
map_entry_t mapEntry
Used internally.
rwlock_t lock
Used internally.
list_t superblocks
Used internally.
Read-Write Ticket Lock structure.