From b9933931b573a01d8fd4525a185c7fa858c44461 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 31 Jan 2012 11:33:35 +0000 Subject: 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 --- extras/mini-os/include/posix/sys/mman.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extras') 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 */ -- cgit v1.2.3