Module Name: src Committed By: reinoud Date: Wed Aug 24 10:56:45 UTC 2011
Modified Files: src/sys/arch/usermode/include: thunk.h src/sys/arch/usermode/usermode: thunk.c Log Message: Implement thunk_malloc() and think_free() To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/usermode/include/thunk.h cvs rdiff -u -r1.17 -r1.18 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.15 src/sys/arch/usermode/include/thunk.h:1.16 --- src/sys/arch/usermode/include/thunk.h:1.15 Tue Aug 23 21:55:21 2011 +++ src/sys/arch/usermode/include/thunk.h Wed Aug 24 10:56:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.h,v 1.15 2011/08/23 21:55:21 jmcneill Exp $ */ +/* $NetBSD: thunk.h,v 1.16 2011/08/24 10:56:45 reinoud Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill <jmcne...@invisible.ca> @@ -83,9 +83,11 @@ int thunk_aio_error(const struct aiocb *); int thunk_aio_return(struct aiocb *); +void * thunk_malloc(size_t len); +void thunk_free(void *addr); 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_munmap(void *Addr, size_t len); +int thunk_munmap(void *addr, size_t len); 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.17 src/sys/arch/usermode/usermode/thunk.c:1.18 --- src/sys/arch/usermode/usermode/thunk.c:1.17 Tue Aug 23 21:55:21 2011 +++ src/sys/arch/usermode/usermode/thunk.c Wed Aug 24 10:56:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.c,v 1.17 2011/08/23 21:55:21 jmcneill Exp $ */ +/* $NetBSD: thunk.c,v 1.18 2011/08/24 10:56:44 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.17 2011/08/23 21:55:21 jmcneill Exp $"); +__RCSID("$NetBSD: thunk.c,v 1.18 2011/08/24 10:56:44 reinoud Exp $"); #include <sys/types.h> #include <sys/ansi.h> @@ -289,6 +289,18 @@ } void * +thunk_malloc(size_t len) +{ + return malloc(len); +} + +void +thunk_free(void *addr) +{ + free(addr); +} + +void * thunk_sbrk(intptr_t len) { return sbrk(len);