From: hunt Date: Mon, 28 Jan 2008 19:20:48 +0000 (+0000) Subject: 2008-01-28 Martin Hunt X-Git-Tag: release-0.6.2~97 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=a2fac8e8d1899b7e12b98fbc83639d321f3f182e;p=systemtap.git 2008-01-28 Martin Hunt * control.c, procfs.c, symbols.c: Use DEFINE_SPINLOCK --- diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index e7bbabd8c..764e3579c 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,7 @@ +2008-01-28 Martin Hunt + + * control.c, procfs.c, symbols.c: Use DEFINE_SPINLOCK + 2008-01-15 Martin Hunt PR4037 and fixes to better synchronize staprun and stapio. diff --git a/runtime/transport/control.c b/runtime/transport/control.c index 3179f507e..0bf99fc89 100644 --- a/runtime/transport/control.c +++ b/runtime/transport/control.c @@ -1,7 +1,7 @@ /* -*- linux-c -*- * * debugfs control channel - * 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,9 +15,9 @@ static int _stp_current_buffers = STP_DEFAULT_BUFFERS; static struct list_head _stp_ctl_ready_q; static struct list_head _stp_sym_ready_q; static struct list_head _stp_pool_q; -spinlock_t _stp_pool_lock = SPIN_LOCK_UNLOCKED; -spinlock_t _stp_ctl_ready_lock = SPIN_LOCK_UNLOCKED; -spinlock_t _stp_sym_ready_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(_stp_pool_lock); +DEFINE_SPINLOCK(_stp_ctl_ready_lock); +DEFINE_SPINLOCK(_stp_sym_ready_lock); static ssize_t _stp_sym_write_cmd (struct file *file, const char __user *buf, size_t count, loff_t *ppos) diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c index 85e97d153..33f6db336 100644 --- a/runtime/transport/procfs.c +++ b/runtime/transport/procfs.c @@ -15,9 +15,9 @@ static int _stp_current_buffers = STP_DEFAULT_BUFFERS; static struct list_head _stp_ctl_ready_q; static struct list_head _stp_sym_ready_q; static struct list_head _stp_pool_q; -spinlock_t _stp_pool_lock = SPIN_LOCK_UNLOCKED; -spinlock_t _stp_ctl_ready_lock = SPIN_LOCK_UNLOCKED; -spinlock_t _stp_sym_ready_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(_stp_pool_lock); +DEFINE_SPINLOCK(_stp_ctl_ready_lock); +DEFINE_SPINLOCK(_stp_sym_ready_lock); #ifdef STP_BULKMODE extern int _stp_relay_flushing; diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index dde0f967e..e740dde8a 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -16,7 +16,7 @@ #define _SYMBOLS_C_ #include "../sym.h" -spinlock_t _stp_module_lock = SPIN_LOCK_UNLOCKED; +DEFINE_SPINLOCK(_stp_module_lock); #define STP_TRYLOCK_MODULES ({ \ int numtrylock = 0; \ while (!spin_trylock_irqsave (&_stp_module_lock, flags) && (++numtrylock < MAXTRYLOCK)) \