#endif
}
-struct task_struct *rxk_ListenerTask;
-
void
osi_linux_mask(void)
{
SIG_UNLOCK(current);
}
-void
-osi_linux_rxkreg(void)
-{
- rxk_ListenerTask = current;
-}
-
-
#if defined(AFS_LINUX24_ENV)
/* LOOKUP_POSITIVE is becoming the default */
#ifndef LOOKUP_POSITIVE
{
struct task_struct *listener;
extern int rxk_ListenerPid;
+ extern struct task_struct *rxk_ListenerTask;
- while (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);
- if (listener) {
- flush_signals(listener);
- force_sig(SIGKILL, listener);
+ while (rxk_ListenerTask) {
+ if (rxk_ListenerTask) {
+ flush_signals(rxk_ListenerTask);
+ force_sig(SIGKILL, rxk_ListenerTask);
}
-#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
- if (!listener)
+ if (!rxk_ListenerTask)
break;
- afs_osi_Sleep(&rxk_ListenerPid);
+ afs_osi_Sleep(&rxk_ListenerTask);
}
sock_release(rx_socket);
rx_socket = NULL;
* OS's socket receive routine returns as a result of a signal.
*/
int rxk_ListenerPid; /* Used to signal process to wakeup at shutdown */
+#ifdef AFS_LINUX20_ENV
+struct task_struct *rxk_ListenerTask;
+#endif
#ifdef AFS_SUN5_ENV
/*
#ifdef AFS_LINUX20_ENV
rxk_ListenerPid = current->pid;
+ rxk_ListenerTask = current;
#endif
#ifdef AFS_SUN5_ENV
rxk_ListenerPid = 1; /* No PID, just a flag that we're alive */
osi_rxWakeup(&afs_termState);
}
rxk_ListenerPid = 0;
-#if defined(AFS_LINUX22_ENV) || defined(AFS_SUN5_ENV)
+#ifdef AFS_LINUX20_ENV
+ rxk_ListenerTask = 0;
+ osi_rxWakeup(&rxk_ListenerTask);
+#endif
+#if defined(AFS_SUN5_ENV)
osi_rxWakeup(&rxk_ListenerPid);
#endif
#ifdef AFS_SUN5_ENV