[Asterisk-cvs] zaptel tor2.c, 1.19.2.4, 1.19.2.5 torisa.c, 1.8.2.3, 1.8.2.4 zaptel.c, 1.95.2.8, 1.95.2.9 ztd-eth.c, 1.8.2.1, 1.8.2.2 ztdummy.c, 1.4.2.4, 1.4.2.5 ztdynamic.c, 1.7.2.4, 1.7.2.5

kpfleming kpfleming
Wed Aug 31 17:42:33 CDT 2005


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv30598

Modified Files:
      Tag: v1-0
	tor2.c torisa.c zaptel.c ztd-eth.c ztdummy.c ztdynamic.c 
Log Message:
make spinlock definitions compatible with -RT kernel patches (and future kernel syntax) (issue #5080)


Index: tor2.c
===================================================================
RCS file: /usr/cvsroot/zaptel/tor2.c,v
retrieving revision 1.19.2.4
retrieving revision 1.19.2.5
diff -u -d -r1.19.2.4 -r1.19.2.5
--- tor2.c	8 Aug 2005 18:23:03 -0000	1.19.2.4
+++ tor2.c	31 Aug 2005 21:43:39 -0000	1.19.2.5
@@ -1087,7 +1087,11 @@
 static int syncsrc = 0;
 static int syncnum = 0 /* -1 */;
 static int syncspan = 0;
+#ifdef DEFINE_SPINLOCK
+static DEFINE_SPINLOCK(synclock);
+#else
 static spinlock_t synclock = SPIN_LOCK_UNLOCKED;
+#endif
 
 static int tor2_findsync(struct tor2 *tor)
 {

Index: torisa.c
===================================================================
RCS file: /usr/cvsroot/zaptel/torisa.c,v
retrieving revision 1.8.2.3
retrieving revision 1.8.2.4
diff -u -d -r1.8.2.3 -r1.8.2.4
--- torisa.c	17 Jan 2005 01:58:09 -0000	1.8.2.3
+++ torisa.c	31 Aug 2005 21:43:39 -0000	1.8.2.4
@@ -130,7 +130,11 @@
 
 static int spansstarted = 0;
 
+#ifdef DEFINE_RWLOCK
+static DEFINE_RWLOCK(torisa);
+#else
 static rwlock_t torisa = RW_LOCK_UNLOCKED;
+#endif
 
 static u_char readdata[2][64][ZT_MAX_CHUNKSIZE];
 static u_char writedata[2][64][ZT_MAX_CHUNKSIZE];

Index: zaptel.c
===================================================================
RCS file: /usr/cvsroot/zaptel/zaptel.c,v
retrieving revision 1.95.2.8
retrieving revision 1.95.2.9
diff -u -d -r1.95.2.8 -r1.95.2.9
--- zaptel.c	2 Aug 2005 18:13:11 -0000	1.95.2.8
+++ zaptel.c	31 Aug 2005 21:43:39 -0000	1.95.2.9
@@ -329,9 +329,13 @@
 	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 @@
 
 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];
 

Index: ztd-eth.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztd-eth.c,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -d -r1.8.2.1 -r1.8.2.2
--- ztd-eth.c	14 Oct 2004 22:30:55 -0000	1.8.2.1
+++ ztd-eth.c	31 Aug 2005 21:43:39 -0000	1.8.2.2
@@ -50,8 +50,11 @@
 
 /* We take the raw message, put it in an ethernet frame, and add a
    two byte addressing header at the top for future use */
-
+#ifdef DEFINE_SPINLOCK
+static DEFINE_SPINLOCK(zlock);
+#else
 static spinlock_t zlock = SPIN_LOCK_UNLOCKED;
+#endif
 
 static struct ztdeth {
 	unsigned char addr[ETH_ALEN];

Index: ztdummy.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztdummy.c,v
retrieving revision 1.4.2.4
retrieving revision 1.4.2.5
diff -u -d -r1.4.2.4 -r1.4.2.5
--- ztdummy.c	21 Jan 2005 05:05:18 -0000	1.4.2.4
+++ ztdummy.c	31 Aug 2005 21:43:39 -0000	1.4.2.5
@@ -152,7 +152,11 @@
 {
 #ifndef LINUX26
     int irq;
+#ifdef DEFINE_SPINLOCK
+    DEFINE_SPINLOCK(mylock);
+#else
     spinlock_t mylock = SPIN_LOCK_UNLOCKED;
+#endif
 	
     if (uhci_devices==NULL){
         printk ("ztdummy: Uhci_devices pointer error.\n");

Index: ztdynamic.c
===================================================================
RCS file: /usr/cvsroot/zaptel/ztdynamic.c,v
retrieving revision 1.7.2.4
retrieving revision 1.7.2.5
diff -u -d -r1.7.2.4 -r1.7.2.5
--- ztdynamic.c	8 Aug 2005 18:17:37 -0000	1.7.2.4
+++ ztdynamic.c	31 Aug 2005 21:43:39 -0000	1.7.2.5
@@ -126,9 +126,11 @@
 static int debug = 0;
 
 static int hasmaster = 0;
-
+#ifdef DEFINE_SPINLOCK
+static DEFINE_SPINLOCK(dlock); 
+#else
 static spinlock_t dlock = SPIN_LOCK_UNLOCKED;
-
+#endif
 
 static void checkmaster(void)
 {




More information about the svn-commits mailing list