Compare commits

..

1 Commits

Author SHA1 Message Date
Mathieu Maret c3f3eb435e implement munmap
Also add basic errno.h
2024-02-11 00:22:41 +01:00
3 changed files with 3 additions and 1 deletions

View File

@ -334,6 +334,7 @@ int uAddrSpaceMmap(struct uAddrSpace *as, uaddr_t *uaddr, size_t size, uint32_t
return -EPERM;
}
size = ALIGN(size, PAGE_SIZE);
struct uAddrVirtualReg *reg =
(struct uAddrVirtualReg *)malloc(sizeof(struct uAddrVirtualReg));
if (!reg)

View File

@ -743,5 +743,5 @@ int munmap(void *addr, size_t len)
if (len == 0)
return -EINVAL;
return syscall2(SYSCALL_ID_MUNMAP, (unsigned int)&addr, len);
return syscall2(SYSCALL_ID_MUNMAP, (unsigned int)addr, len);
}

View File

@ -111,6 +111,7 @@ int func_munmap()
return ret;
}
printf("unmap done\n");
listMmap = listMmap->next;
free(area);