vfs: add open and close syscalls
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
09116d65ea
commit
debd580784
2 changed files with 78 additions and 2 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <kernel/spinlock.h>
|
||||
#include <kernel/mem.h>
|
||||
#include <kernel/page.h>
|
||||
#include <fs/vfs.h>
|
||||
|
||||
#include <lib/rbtree.h>
|
||||
|
||||
|
|
@ -29,6 +30,14 @@ struct proc_alloc {
|
|||
size_t len;
|
||||
};
|
||||
|
||||
struct file {
|
||||
dirent_t *dirent;
|
||||
u64 flags;
|
||||
u64 offset;
|
||||
u64 refcount;
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
struct proc;
|
||||
struct thread {
|
||||
tid_t tid;
|
||||
|
|
@ -62,6 +71,10 @@ struct proc {
|
|||
|
||||
uaddr_t entry;
|
||||
|
||||
spinlock_t fd_lock;
|
||||
size_t fd_array_size;
|
||||
struct file *fdt;
|
||||
|
||||
struct ehdr *ehdr;
|
||||
struct phdr *phdrs;
|
||||
size_t n_phdrs;
|
||||
|
|
|
|||
Loading…
Reference in a new issue