+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.
/* -*- 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
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)
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;
#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)) \