45 if (superblock ==
NULL)
#define assert(expression)
void inode_notify_change(inode_t *inode)
Notify the inode that its metadata has changed.
void inode_notify_modify(inode_t *inode)
Notify the inode that its content has been modified.
void inode_notify_access(inode_t *inode)
Notify the inode that it has been accessed.
void inode_truncate(inode_t *inode)
Truncate the inode.
inode_t * inode_new(superblock_t *superblock, inode_number_t number, inode_type_t type, const inode_ops_t *ops, const file_ops_t *fileOps)
Create a new inode.
void vfs_remove_inode(inode_t *inode)
Remove an inode from the inode cache.
uint64_t vfs_add_inode(inode_t *inode)
Add a inode to the inode cache.
void mutex_init(mutex_t *mtx)
Initializes a mutex.
#define MUTEX_SCOPE(mutex)
Acquires a mutex for the reminder of the current scope.
time_t timer_unix_epoch(void)
The unix epoch.
void map_entry_init(map_entry_t *entry)
Initialize a map entry.
static void ref_init(ref_t *ref, void *free)
Initialize a reference counter.
#define REF(ptr)
Increment reference count.
#define DEREF(ptr)
Decrement reference count.
#define EINVAL
Invalid argument.
#define errno
Error number variable.
inode_type_t
Inode type enum.
uint64_t inode_number_t
Inode number enum.
#define NULL
Pointer error value.
#define ERR
Integer error value.
static void inode_free(inode_t *inode)
static socket_family_ops_t ops
static file_ops_t fileOps
#define RFLAGS_INTERRUPT_ENABLE
static uint64_t rflags_read()
_PUBLIC void * malloc(size_t size)
_PUBLIC void free(void *ptr)
File operations structure.
void(* cleanup)(inode_t *inode)
void(* truncate)(inode_t *target)
time_t accessTime
Unix time stamp for the last inode access.
time_t createTime
Unix time stamp for the inode creation.
time_t modifyTime
Unix time stamp for last file content alteration.
inode_type_t type
Constant after creation.
inode_number_t number
Constant after creation.
superblock_t * superblock
Constant after creation.
const inode_ops_t * ops
Constant after creation.
time_t changeTime
Unix time stamp for the last file metadata alteration.
const file_ops_t * fileOps
Constant after creation.
map_entry_t mapEntry
Protected by the inodeCache lock.
void(* freeInode)(superblock_t *superblock, inode_t *inode)
inode_t *(* allocInode)(superblock_t *superblock)
const superblock_ops_t * ops