Module Name: src Committed By: reinoud Date: Sun Aug 21 17:11:59 UTC 2011
Modified Files: src/sys/arch/usermode/include: thunk.h src/sys/arch/usermode/usermode: thunk.c Log Message: Fix thunk_mkstemp() prototype and add thunk_mprotect() To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/usermode/include/thunk.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/usermode/usermode/thunk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/usermode/include/thunk.h diff -u src/sys/arch/usermode/include/thunk.h:1.7 src/sys/arch/usermode/include/thunk.h:1.8 --- src/sys/arch/usermode/include/thunk.h:1.7 Sun Aug 21 15:10:57 2011 +++ src/sys/arch/usermode/include/thunk.h Sun Aug 21 17:11:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.h,v 1.7 2011/08/21 15:10:57 reinoud Exp $ */ +/* $NetBSD: thunk.h,v 1.8 2011/08/21 17:11:59 reinoud Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill <jmcne...@invisible.ca> @@ -62,7 +62,7 @@ ssize_t thunk_pread(int, void *, size_t, off_t); ssize_t thunk_pwrite(int, const void *, size_t, off_t); int thunk_fsync(int); -int thunk_mkstemp(const char *); +int thunk_mkstemp(char *); int thunk_sigaction(int, const struct sigaction *, struct sigaction *); @@ -73,5 +73,6 @@ void * thunk_sbrk(intptr_t len); void * thunk_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset); +int thunk_mprotect(void *addr, size_t len, int prot); #endif /* !_ARCH_USERMODE_INCLUDE_THUNK_H */ Index: src/sys/arch/usermode/usermode/thunk.c diff -u src/sys/arch/usermode/usermode/thunk.c:1.7 src/sys/arch/usermode/usermode/thunk.c:1.8 --- src/sys/arch/usermode/usermode/thunk.c:1.7 Sun Aug 21 15:10:57 2011 +++ src/sys/arch/usermode/usermode/thunk.c Sun Aug 21 17:11:59 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.c,v 1.7 2011/08/21 15:10:57 reinoud Exp $ */ +/* $NetBSD: thunk.c,v 1.8 2011/08/21 17:11:59 reinoud Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: thunk.c,v 1.7 2011/08/21 15:10:57 reinoud Exp $"); +__RCSID("$NetBSD: thunk.c,v 1.8 2011/08/21 17:11:59 reinoud Exp $"); #include <machine/thunk.h> @@ -161,7 +161,7 @@ } int -thunk_mkstemp(const char *template) +thunk_mkstemp(char *template) { return mkstemp(template); } @@ -207,3 +207,10 @@ { return mmap(addr, len, prot, flags, fd, offset); } + +int +thunk_mprotect(void *addr, size_t len, int prot) +{ + return mprotect(addr, len, prot); +} +