axf-os161 / kern / include / file_syscalls.h
file_syscalls.h
Raw
#pragma once

#define FILE_CLOSED (-1)
#define FIRST_NON_RESEVERED_FD (3U)

typedef struct{
	volatile bool in_use;
	int openstatus;
	off_t offset;
	volatile int refcount;
	struct vnode *vnodeptr;
	ssize_t filesize;
}openfile;

// Initializes locks and global file descriptor table on bootup
void file_syscalls_bootstrap(void);