conditionalize-tasklist-lock-20070226
authorStephan Wiesand <Stephan.Wiesand@desy.de>
Mon, 26 Feb 2007 17:55:55 +0000 (17:55 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 26 Feb 2007 17:55:55 +0000 (17:55 +0000)
FIXES 54922

make rx_knet use tasklist_lock conditionally also

src/rx/LINUX/rx_knet.c

index 4b2720e..8587b0d 100644 (file)
@@ -204,24 +204,34 @@ osi_NetReceive(osi_socket so, struct sockaddr_in *from, struct iovec *iov,
 
     return code;
 }
+#ifdef EXPORTED_TASKLIST_LOCK
 extern rwlock_t tasklist_lock __attribute__((weak));
+#endif
 void
 osi_StopListener(void)
 {
     struct task_struct *listener;
     extern int rxk_ListenerPid;
 
+#ifdef EXPORTED_TASKLIST_LOCK
     if (&tasklist_lock)
       read_lock(&tasklist_lock);
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+#ifdef EXPORTED_TASKLIST_LOCK
     else
+#endif
       rcu_read_lock();
 #endif
     listener = find_task_by_pid(rxk_ListenerPid);
+#ifdef EXPORTED_TASKLIST_LOCK
     if (&tasklist_lock)
        read_unlock(&tasklist_lock);
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+#ifdef EXPORTED_TASKLIST_LOCK
     else
+#endif
       rcu_read_unlock();
 #endif
     while (rxk_ListenerPid) {