Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/usermode Fix thunk_mkstemp() prototype and add thun...



details:   https://anonhg.NetBSD.org/src/rev/58ec5c54f982
branches:  trunk
changeset: 768590:58ec5c54f982
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sun Aug 21 17:11:59 2011 +0000

description:
Fix thunk_mkstemp() prototype and add thunk_mprotect()

diffstat:

 sys/arch/usermode/include/thunk.h  |   5 +++--
 sys/arch/usermode/usermode/thunk.c |  13 ++++++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

diffs (63 lines):

diff -r 4eb17338e46d -r 58ec5c54f982 sys/arch/usermode/include/thunk.h
--- a/sys/arch/usermode/include/thunk.h Sun Aug 21 15:21:46 2011 +0000
+++ b/sys/arch/usermode/include/thunk.h Sun Aug 21 17:11:59 2011 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 */
diff -r 4eb17338e46d -r 58ec5c54f982 sys/arch/usermode/usermode/thunk.c
--- a/sys/arch/usermode/usermode/thunk.c        Sun Aug 21 15:21:46 2011 +0000
+++ b/sys/arch/usermode/usermode/thunk.c        Sun Aug 21 17:11:59 2011 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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);
+}
+



Home | Main Index | Thread Index | Old Index