From 395d6cf1121410e4795193ee42fb1890d1695907 Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 28 Jan 2008 19:22:51 +0000 Subject: 2008-01-28 Martin Hunt * alloc.c: Use DEFINE_SPINLOCK. * counter.c: Ditto. * pmap-gen.c: Ditto. * print_new.c: Ditto. * stat.c: Ditto. --- runtime/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/alloc.c') diff --git a/runtime/alloc.c b/runtime/alloc.c index f022755a..674a340d 100644 --- a/runtime/alloc.c +++ b/runtime/alloc.c @@ -32,7 +32,7 @@ static int _stp_allocated_net_memory = 0; #ifdef DEBUG_MEM -static spinlock_t _stp_mem_lock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(_stp_mem_lock); static int _stp_allocated_memory = 0; #define MEM_MAGIC 0xc11cf77f -- cgit From 5d03112aaed421893cc08a6112b699995d254506 Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 30 Jan 2008 00:43:22 +0000 Subject: 2008-01-29 Martin Hunt * alloc.c (struct _stp_malloc_type): Remove redundant field. --- runtime/alloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'runtime/alloc.c') diff --git a/runtime/alloc.c b/runtime/alloc.c index 674a340d..cfdb97bd 100644 --- a/runtime/alloc.c +++ b/runtime/alloc.c @@ -41,15 +41,14 @@ static int _stp_allocated_memory = 0; enum _stp_memtype { MEM_KMALLOC, MEM_VMALLOC, MEM_PERCPU }; typedef struct { - enum _stp_memtype type; char *alloc; char *free; } _stp_malloc_type; static const _stp_malloc_type const _stp_malloc_types[] = { - {MEM_KMALLOC, "kmalloc", "kfree"}, - {MEM_VMALLOC, "vmalloc", "vfree"}, - {MEM_PERCPU, "alloc_percpu", "free_percpu"} + {"kmalloc", "kfree"}, + {"vmalloc", "vfree"}, + {"alloc_percpu", "free_percpu"} }; struct _stp_mem_entry { -- cgit