diff --git a/tasks/libposix/mmap.c b/tasks/libposix/mmap.c index 5c4c10e..5855b6c 100644 --- a/tasks/libposix/mmap.c +++ b/tasks/libposix/mmap.c @@ -78,7 +78,7 @@ int l4_munmap(void *start, size_t length) write_mr(L4SYS_ARG1, length); /* Call pager with MMAP request. */ - if ((err = l4_sendrecv(PAGER_TID, PAGER_TID, L4_IPC_TAG_MMAP)) < 0) { + if ((err = l4_sendrecv(PAGER_TID, PAGER_TID, L4_IPC_TAG_MUNMAP)) < 0) { printf("%s: IPC Error: %d.\n", __FUNCTION__, err); return err; } @@ -116,7 +116,7 @@ int l4_msync(void *start, size_t length, int flags) } /* Check if syscall itself was successful */ if ((errno = l4_get_retval()) < 0) { - printf("%s: MUNMAP Error: %d.\n", __FUNCTION__, errno); + printf("%s: MSYNC Error: %d.\n", __FUNCTION__, errno); return -1; } return 0; diff --git a/tasks/test0/src/mmaptest.c b/tasks/test0/src/mmaptest.c index 1ab2898..c7f70af 100644 --- a/tasks/test0/src/mmaptest.c +++ b/tasks/test0/src/mmaptest.c @@ -38,17 +38,20 @@ int mmaptest(void) else printf("write: Success.\n"); + printf("%s: Calling mmap()\n", __TASKNAME__); if ((int)(base = mmap(0, PAGE_SIZE*16, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) < 0) perror("mmap"); else printf("mmap: Success: %p\n", base); *(unsigned int *)(base + PAGE_SIZE*2) = 0x1000; + printf("%s: Calling msync()\n", __TASKNAME__); if (msync(base + PAGE_SIZE*2, PAGE_SIZE, MS_SYNC) < 0) perror("msync"); else printf("msync: Success: %p\n", base); + printf("%s: Calling munmap()\n", __TASKNAME__); if (munmap(base + PAGE_SIZE*2, PAGE_SIZE) < 0) perror("munmap"); else