pthreaded-ubik-20080402
[openafs.git] / src / ubik / beacon.c
index bcbc362..937d54d 100644 (file)
@@ -330,7 +330,11 @@ ubeacon_Interact(void *dummy)
                temp = POLLTIME;
            tt.tv_sec = temp;
            tt.tv_usec = 0;
+#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+           code = select(0, 0, 0, 0, &tt);
+#else
            code = IOMGR_Select(0, 0, 0, 0, &tt);
+#endif
        } else
            code = 0;
 
@@ -446,7 +450,13 @@ ubeacon_Interact(void *dummy)
                ubik_dprint("Ubik: I am the sync site\n");
            ubik_amSyncSite = 1;
            syncSiteUntil = oldestYesVote + SMALLTIME;
-           LWP_NoYieldSignal(&ubik_amSyncSite);
+#ifndef AFS_PTHREAD_ENV
+#ifndef UBIK_PTHREAD_ENV
+               /* I did not find a corresponding LWP_WaitProcess(&ubik_amSyncSite) --
+                  this may be a spurious signal call -- sjenkins */
+               LWP_NoYieldSignal(&ubik_amSyncSite);
+#endif
+#endif
        } else {
            if (ubik_amSyncSite)
                ubik_dprint("Ubik: I am no longer the sync site\n");