Nucleus
Barry Virtual Memory page fault handling b0cc93c (3 years, 2 months ago)
diff --git a/include/nucleus/vfs.h b/include/nucleus/vfs.h
index 40239c7..fa193fb 100644
--- a/include/nucleus/vfs.h
+++ b/include/nucleus/vfs.h
@@ -85,6 +85,7 @@ struct FileOps {
size_t (*read)(File *, char *, size_t, off_t);
size_t (*write)(File *, char *, size_t, off_t);
int (*open)(File *);
+ void (*mmap)(File *, void *, size_t, off_t);
};
extern ObjectType fstypeType;
@@ -96,6 +97,7 @@ extern ObjectType dirEntryType;
extern ObjectType fileType;
void init_vfs(void);
+File *create_anonymous_file(void);
void register_fstype(const char *name, mount_callback_t mount);
int mount(const char *src, const char *target, const char *type,
unsigned long flags, void *data);
@@ -115,6 +117,7 @@ DirEntry *find_direntry(ObjectList *list, const char *name);
int file_open(File *file);
size_t file_read(File *file, char *buf, size_t count);
size_t file_write(File *file, char *buf, size_t count);
+void file_mmap(File *file, void *addr, size_t len, off_t offset);
/* Files namespace functions */
File *get_file_by_fd(int fd);
int allocate_fd(void);