]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
linux-unmask-signals-in-rxk-listener-at-shutdown-20020124
authorDerrick Brashear <shadow@dementia.org>
Thu, 24 Jan 2002 10:42:34 +0000 (10:42 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 24 Jan 2002 10:42:34 +0000 (10:42 +0000)
since the rxk listener gets "kill"d at shutdown we need to unmask to wake
it up. this should probably be replaced but the logical way is evil,
involves simulating a packet to the listener so it wakes up and notices it's
time to die

src/afs/LINUX/osi_misc.c
src/afs/afs_call.c
src/afs/afs_osi.c

index ec345b31aca47cd54959081cb4b56274933a5829..0e6df7bda27612246699569a6519bf32b9f22a5d 100644 (file)
@@ -427,3 +427,23 @@ void check_bad_parent(struct dentry *dp)
  
   return;
 }
+
+struct task_struct *rxk_ListenerTask;
+
+void osi_linux_mask() {
+    spin_lock_irq(&current->sigmask_lock);
+    sigfillset(&current->blocked);
+    recalc_sigpending(current);
+    spin_unlock_irq(&current->sigmask_lock);
+}
+
+void osi_linux_unmask() {
+    spin_lock_irq(&rxk_ListenerTask->sigmask_lock);
+    sigemptyset(&rxk_ListenerTask->blocked);
+    recalc_sigpending(rxk_ListenerTask);
+    spin_unlock_irq(&rxk_ListenerTask->sigmask_lock);
+}
+
+void osi_linux_rxkreg() {
+    rxk_ListenerTask = current;
+}
index 0d2c05ea4661d6e45460b8cae586a59f0ab92566..7e538774e21df35a0462831e22df795b42d81581 100644 (file)
@@ -191,6 +191,9 @@ long parm, parm2, parm3, parm4, parm5, parm6;
            afs_osi_Invisible();
            afs_RX_Running = 2;
            afs_osi_Wakeup(&afs_RX_Running);
+#ifndef UKERNEL
+           afs_osi_RxkRegister();
+#endif
            rxk_Listener();
        }
 #ifdef AFS_SGI_ENV
@@ -1257,6 +1260,9 @@ afs_shutdown()
        afs_osi_Sleep(&afs_termState);
 #if defined(RXK_LISTENER_ENV)
     afs_warn("RxListener... ");
+#ifndef UKERNEL
+    afs_osi_UnmaskRxkSignals();
+#endif
     /* cancel rx listener */
     osi_StopListener(); /* This closes rx_socket. */
     while (afs_termState == AFSOP_STOP_RXK_LISTENER) 
index bd762eafbddab7d53f3b382550bc6096ddb41886..ac3f65d9225c8aa1e5e8cad12c428a0f8335b0d6 100644 (file)
@@ -283,13 +283,24 @@ afs_gfs_FlushText(vp)
 /* mask signals in afsds */
 void afs_osi_MaskSignals(){
 #ifdef AFS_LINUX22_ENV
-    spin_lock_irq(&current->sigmask_lock);
-    sigfillset(&current->blocked);
-    recalc_sigpending(current);
-    spin_unlock_irq(&current->sigmask_lock);
+    osi_linux_mask();
 #endif
 }
     
+/* unmask signals in rxk listener */
+void afs_osi_UnmaskRxkSignals(){
+#ifdef AFS_LINUX22_ENV
+    osi_linux_unmask();
+#endif
+}
+    
+/* register rxk listener proc info */
+void afs_osi_RxkRegister(){
+#ifdef AFS_LINUX22_ENV
+    osi_linux_rxkreg();
+#endif
+}
+
 /* procedure for making our processes as invisible as we can */
 void afs_osi_Invisible() {
 #ifdef AFS_LINUX22_ENV