rx: Convert rxinit_status to rx_IsRunning()
[openafs.git] / src / rx / rx_user.c
index 598be2b..0ba068b 100644 (file)
@@ -352,7 +352,6 @@ rx_getAllAddrMaskMtu(afs_uint32 addrBuffer[], afs_uint32 maskBuffer[],
 #endif
 
 #ifdef AFS_NT40_ENV
-extern rx_atomic_t rxinit_status;
 void
 rxi_InitMorePackets(void) {
     int npackets, ncbufs;
@@ -373,7 +372,7 @@ rx_GetIFInfo(void)
 
     LOCK_IF_INIT;
     if (Inited) {
-       if (Inited < 2 && !rx_atomic_test_bit(&rxinit_status, 0)) {
+       if (Inited < 2 && rxi_IsRunning()) {
             /* We couldn't initialize more packets earlier.
              * Do it now. */
             rxi_InitMorePackets();
@@ -407,11 +406,11 @@ rx_GetIFInfo(void)
     UNLOCK_IF;
 
     /*
-     * If rxinit_status is still set, rx_InitHost() has yet to be called
+     * If rxi_IsRunning is false, rx_InitHost() has yet to be called
      * and we therefore do not have any mutex locks initialized.  As a
      * result we cannot call rxi_MorePackets() without crashing.
      */
-    if (rx_atomic_test_bit(&rxinit_status, 0))
+    if (!rxi_IsRunning())
         return;
 
     rxi_InitMorePackets();
@@ -437,7 +436,7 @@ fudge_netmask(afs_uint32 addr)
 
 
 
-#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN160_ENV)
 int
 rxi_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
 {
@@ -448,8 +447,10 @@ rxi_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
 
 #if defined(AFS_SGI_ENV)
     rcode = afs_syscall(AFS_SYSCALL, 28, a3, a4, a5);
-#else
+#elif defined(AFS_SYSCALL)
     rcode = syscall(AFS_SYSCALL, 28 /* AFSCALL_CALL */ , a3, a4, a5);
+#else
+    rcode = -1;
 #endif /* AFS_SGI_ENV */
 
     signal(SIGSYS, old);
@@ -564,7 +565,7 @@ rx_GetIFInfo(void)
        }
 #endif /* SIOCGIFFLAGS */
 
-#if !defined(AFS_AIX_ENV)  && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN160_ENV)
        /* this won't run on an AIX system w/o a cache manager */
        rxi_syscallp = rxi_syscall;
 #endif