diff options
author | hunt <hunt> | 2008-01-28 19:22:51 +0000 |
---|---|---|
committer | hunt <hunt> | 2008-01-28 19:22:51 +0000 |
commit | 395d6cf1121410e4795193ee42fb1890d1695907 (patch) | |
tree | c460748a18bc518a9badc50eaffa96de874bc157 | |
parent | a2fac8e8d1899b7e12b98fbc83639d321f3f182e (diff) | |
download | systemtap-steved-395d6cf1121410e4795193ee42fb1890d1695907.tar.gz systemtap-steved-395d6cf1121410e4795193ee42fb1890d1695907.tar.xz systemtap-steved-395d6cf1121410e4795193ee42fb1890d1695907.zip |
2008-01-28 Martin Hunt <hunt@redhat.com>
* alloc.c: Use DEFINE_SPINLOCK.
* counter.c: Ditto.
* pmap-gen.c: Ditto.
* print_new.c: Ditto.
* stat.c: Ditto.
-rw-r--r-- | runtime/ChangeLog | 8 | ||||
-rw-r--r-- | runtime/alloc.c | 2 | ||||
-rw-r--r-- | runtime/counter.c | 4 | ||||
-rw-r--r-- | runtime/pmap-gen.c | 6 | ||||
-rw-r--r-- | runtime/print_new.c | 5 | ||||
-rw-r--r-- | runtime/stat.c | 4 |
6 files changed, 19 insertions, 10 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 020d2176..c793fbd9 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,11 @@ +2008-01-28 Martin Hunt <hunt@redhat.com> + + * alloc.c: Use DEFINE_SPINLOCK. + * counter.c: Ditto. + * pmap-gen.c: Ditto. + * print_new.c: Ditto. + * stat.c: Ditto. + 2008-01-27 Frank Ch. Eigler <fche@elastic.org> * stack-i386.c (__stp_stack_print): Correct #elif->#else typo. 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 diff --git a/runtime/counter.c b/runtime/counter.c index 42555dfa..d0376547 100644 --- a/runtime/counter.c +++ b/runtime/counter.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Counter aggregation Functions - * Copyright (C) 2005 Red Hat Inc. + * Copyright (C) 2005-2008 Red Hat Inc. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -60,7 +60,7 @@ Counter _stp_counter_init (void) int i; for_each_cpu(i) { Counter c = per_cpu_ptr (cnt, i); - c->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(c->lock); } } #endif diff --git a/runtime/pmap-gen.c b/runtime/pmap-gen.c index ca8d45c5..0efffdb6 100644 --- a/runtime/pmap-gen.c +++ b/runtime/pmap-gen.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * pmap API generator - * Copyright (C) 2005-2007 Red Hat Inc. + * Copyright (C) 2005-2008 Red Hat Inc. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -412,7 +412,7 @@ PMAP KEYSYM(_stp_pmap_new) (unsigned max_entries) m->copy = KEYSYM(pmap_copy_keys); m->cmp = KEYSYM(pmap_key_cmp); #if NEED_MAP_LOCKS - m->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(m->lock); #endif } m = &pmap->agg; @@ -466,7 +466,7 @@ PMAP KEYSYM(_stp_pmap_new) (unsigned max_entries, int htype, ...) m->copy = KEYSYM(pmap_copy_keys); m->cmp = KEYSYM(pmap_key_cmp); #if NEED_MAP_LOCKS - m->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(m->lock); #endif } m = &pmap->agg; diff --git a/runtime/print_new.c b/runtime/print_new.c index 95a83a8d..75bbd82b 100644 --- a/runtime/print_new.c +++ b/runtime/print_new.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Print Flush Function - * Copyright (C) 2007 Red Hat Inc. + * Copyright (C) 2007-2008 Red Hat Inc. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -15,7 +15,8 @@ * * @note Preemption must be disabled to use this. */ -spinlock_t _stp_print_lock = SPIN_LOCK_UNLOCKED; + +DEFINE_SPINLOCK(_stp_print_lock); void EXPORT_FN(stp_print_flush) (_stp_pbuf *pb) { diff --git a/runtime/stat.c b/runtime/stat.c index 298a6653..f8b5f018 100644 --- a/runtime/stat.c +++ b/runtime/stat.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Statistics Aggregation - * Copyright (C) 2005, 2007 Red Hat Inc. + * Copyright (C) 2005-2008 Red Hat Inc. * Copyright (C) 2006 Intel Corporation * * This file is part of systemtap, and is free software. You can @@ -111,7 +111,7 @@ Stat _stp_stat_init (int type, ...) int i; for_each_cpu(i) { stat *sdp = per_cpu_ptr (sd, i); - sdp->lock = SPIN_LOCK_UNLOCKED; + spin_lock_init(sdp->lock); } } #endif |