summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-08-31 21:43:39 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-08-31 21:43:39 +0000
commitebf8bded3f539c61a5a99e1d43214d1b0228396a (patch)
tree57c7fc03b8e5944ad45319c09e0495dfd87d293c /zaptel.c
parent3e06aadaa9965a951c0b0e322655f3ecd46be8e1 (diff)
make spinlock definitions compatible with -RT kernel patches (and future kernel syntax) (issue #5080)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/v1-0@752 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/zaptel.c b/zaptel.c
index 714fc66..ac85f01 100755
--- a/zaptel.c
+++ b/zaptel.c
@@ -329,9 +329,13 @@ static struct zt_timer {
wait_queue_head_t sel;
} *zaptimers = NULL;
+#ifdef DEFINE_SPINLOCK
+static DEFINE_SPINLOCK(zaptimerlock);
+static DEFINE_SPINLOCK(bigzaplock);
+#else
static spinlock_t zaptimerlock = SPIN_LOCK_UNLOCKED;
-
static spinlock_t bigzaplock = SPIN_LOCK_UNLOCKED;
+#endif
struct zt_zone {
char name[40]; /* Informational, only */
@@ -364,8 +368,13 @@ u_char __zt_lin2a[16384];
static u_char defgain[256];
+#ifdef DEFINE_RWLOCK
+static DEFINE_RWLOCK(zone_lock);
+static DEFINE_RWLOCK(chan_lock);
+#else
static rwlock_t zone_lock = RW_LOCK_UNLOCKED;
static rwlock_t chan_lock = RW_LOCK_UNLOCKED;
+#endif
static struct zt_zone *tone_zones[ZT_TONE_ZONE_MAX];