vmmcache: initial implementation

This commit is contained in:
Matheus
2024-05-24 18:03:24 -03:00
parent 7673a365e8
commit 48b7fb4324
21 changed files with 772 additions and 134 deletions
+7
View File
@@ -57,11 +57,18 @@ syscallret_t syscall_mmap(context_t *context, void *hint, size_t len, int prot,
vmmfiledesc_t vfd;
file_t *file = NULL;
if (isfile) {
// make sure offset is page aligned
if (offset % PAGE_SIZE) {
ret.errno = EINVAL;
return ret;
}
file = fd_get(fd);
if (file == NULL) {
ret.errno = EBADF;
return ret;
}
vfd.node = file->vnode;
vfd.offset = offset;
}