summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/transport/ChangeLog4
-rw-r--r--runtime/transport/control.c8
-rw-r--r--runtime/transport/procfs.c6
-rw-r--r--runtime/transport/symbols.c2
4 files changed, 12 insertions, 8 deletions
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog
index e7bbabd8..764e3579 100644
--- a/runtime/transport/ChangeLog
+++ b/runtime/transport/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-28 Martin Hunt <hunt@redhat.com>
+
+ * control.c, procfs.c, symbols.c: Use DEFINE_SPINLOCK
+
2008-01-15 Martin Hunt <hunt@redhat.com>
PR4037 and fixes to better synchronize staprun and stapio.
diff --git a/runtime/transport/control.c b/runtime/transport/control.c
index 3179f507..0bf99fc8 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 85e97d15..33f6db33 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 dde0f967..e740dde8 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)) \