aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2012-01-31 11:33:35 +0000
committerOlaf Hering <olaf@aepfle.de>2012-01-31 11:33:35 +0000
commitb9933931b573a01d8fd4525a185c7fa858c44461 (patch)
treed1e000d2912caf57db669e76dc52596fd6999e98 /extras
parente47ceecc301c3d1123aaf2c6d95f214a6dda4e81 (diff)
downloadxen-b9933931b573a01d8fd4525a185c7fa858c44461.tar.gz
xen-b9933931b573a01d8fd4525a185c7fa858c44461.tar.bz2
xen-b9933931b573a01d8fd4525a185c7fa858c44461.zip
mini-os: convert mlock macros to C functions
mlock and munlock are implemented as macros in mini-os. Their usage requires casting in common code. Convert them to C syntax and provide an empty dummy function. Remove the now unneeded (void) cast from two munlock calls. Signed-off-by: Olaf Hering <olaf@aepfle.de>
Diffstat (limited to 'extras')
-rw-r--r--extras/mini-os/include/posix/sys/mman.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/mini-os/include/posix/sys/mman.h b/extras/mini-os/include/posix/sys/mman.h
index 3b9ef19aa1..4d349792b6 100644
--- a/extras/mini-os/include/posix/sys/mman.h
+++ b/extras/mini-os/include/posix/sys/mman.h
@@ -16,7 +16,7 @@
void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset) asm("mmap64");
int munmap(void *start, size_t length);
-#define munlock(addr, len) ((void)(addr), (void)(len), 0)
-#define mlock(addr, len) ((void)(addr), (void)(len), 0)
+static inline mlock(const void *addr, size_t len) { return 0; }
+static inline munlock(const void *addr, size_t len) { return 0; }
#endif /* _POSIX_SYS_MMAN_H */