From 446ffd97017f72652b64c43bf25fc5fccbb3ddf0 Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 8 Nov 2005 19:26:16 +0000 Subject: 2005-11-08 Martin Hunt * recreate_links: Add link to pmap-gen.c * print.c (next_fmt): Remove unneeded dbug(). * alloc.c: Update to reflect changes to runtime/alloc.c. --- runtime/user/alloc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'runtime/user/alloc.c') diff --git a/runtime/user/alloc.c b/runtime/user/alloc.c index c9d36f3f..9c7fa5c0 100644 --- a/runtime/user/alloc.c +++ b/runtime/user/alloc.c @@ -38,6 +38,7 @@ void *_stp_alloc(size_t len) _stp_errorcode = ERR_NO_MEM; return ptr; } +#define _stp_alloc_cpu(len, cpu) _stp_alloc(len) /** Allocates and clears memory within a probe. * This is used for small allocations from within a running @@ -71,7 +72,12 @@ void *_stp_valloc(size_t len) _stp_errorcode = ERR_NO_MEM; return ptr; } - +#define _stp_valloc_cpu(len, cpu) _stp_valloc(len) +#define __stp_valloc_percpu(size,align) __alloc_percpu(size,align) +#define _stp_vfree_percpu(objp) free_percpu(objp) +#define _stp_valloc_percpu(type) \ + ((type *)(__stp_valloc_percpu(sizeof(type), __alignof__(type)))) +#define _stp_percpu_dptr(ptr) (((struct percpu_data *)~(unsigned long)(ptr))->blkp) /** Frees memory allocated by _stp_alloc or _stp_calloc. * @param ptr pointer to memory to free */ -- cgit