kill-ubik-pthread-env-20080718
authorRuss Allbery <rra@stanford.edu>
Sat, 19 Jul 2008 07:11:05 +0000 (07:11 +0000)
committerRuss Allbery <rra@stanford.edu>
Sat, 19 Jul 2008 07:11:05 +0000 (07:11 +0000)
LICENSE BSD

Everywhere AFS_PTHREAD_ENV was defined, UBIK_PTHREAD_ENV was defined as
well, so don't make them separate.  Building pthreaded Ubik is controlled
by deciding whether to build the t* versions of various directories, not
by the preprocessor directives.  AFS_PTHREAD_ENV is only defined when
building in those directories.

This change eliminates UBIK_PTHREAD_ENV and uses AFS_PTHREAD_ENV to mean
the same thing.

As a side effect, fixes compiles on arm with --enable-pthreaded-ubik, since
arm never defined UBIK_PTHREAD_ENV.

14 files changed:
src/budb/db_dump.c
src/budb/dbs_dump.c
src/budb/globals.h
src/budb/procs.c
src/cf/osconf.m4
src/ubik/beacon.c
src/ubik/disk.c
src/ubik/phys.c
src/ubik/recovery.c
src/ubik/remote.c
src/ubik/ubik.c
src/ubik/ubik.p.h
src/ubik/utst_client.c
src/ubik/utst_server.c

index 808c65e..983b1d2 100644 (file)
@@ -73,7 +73,7 @@ canWrite(fid)
     while (dumpSyncPtr->ds_bytes > 0) {
        if (dumpSyncPtr->ds_readerStatus == DS_WAITING) {
            dumpSyncPtr->ds_readerStatus = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            assert(pthread_cond_broadcast(&dumpSyncPtr->ds_readerStatus_cond) == 0);
 #else
            code = LWP_SignalProcess(&dumpSyncPtr->ds_readerStatus);
@@ -83,7 +83,7 @@ canWrite(fid)
        }
        dumpSyncPtr->ds_writerStatus = DS_WAITING;
        ReleaseWriteLock(&dumpSyncPtr->ds_lock);
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        assert(pthread_mutex_lock(&dumpSyncPtr->ds_writerStatus_mutex) == 0);
        assert(pthread_cond_wait(&dumpSyncPtr->ds_writerStatus_cond, &dumpSyncPtr->ds_writerStatus_mutex) == 0);
        assert(pthread_mutex_unlock(&dumpSyncPtr->ds_writerStatus_mutex) == 0);
@@ -113,7 +113,7 @@ haveWritten(nbytes)
     dumpSyncPtr->ds_bytes += nbytes;
     if (dumpSyncPtr->ds_readerStatus == DS_WAITING) {
        dumpSyncPtr->ds_readerStatus = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        assert(pthread_cond_broadcast(&dumpSyncPtr->ds_readerStatus_cond) == 0);
 #else
        code = LWP_SignalProcess(&dumpSyncPtr->ds_readerStatus);
@@ -141,7 +141,7 @@ doneWriting(error)
        LogDebug(4, "doneWriting: waiting for Reader\n");
        dumpSyncPtr->ds_writerStatus = DS_WAITING;
        ReleaseWriteLock(&dumpSyncPtr->ds_lock);
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        assert(pthread_mutex_lock(&dumpSyncPtr->ds_writerStatus_mutex) == 0);
        assert(pthread_cond_wait(&dumpSyncPtr->ds_writerStatus_cond, &dumpSyncPtr->ds_writerStatus_mutex) == 0);
        assert(pthread_mutex_unlock(&dumpSyncPtr->ds_writerStatus_mutex) == 0);
@@ -159,7 +159,7 @@ doneWriting(error)
     else
        dumpSyncPtr->ds_writerStatus = DS_DONE;
     dumpSyncPtr->ds_readerStatus = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
     assert(pthread_cond_broadcast(&dumpSyncPtr->ds_readerStatus_cond) == 0);
 #else
     code = LWP_NoYieldSignal(&dumpSyncPtr->ds_readerStatus);
index 0dcd34d..2b94325 100644 (file)
@@ -115,11 +115,10 @@ DumpDB(call, firstcall, maxLength, charListPtr, done)
      charListT *charListPtr;
      afs_int32 *done;
 {
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
     pthread_t dumperPid, watcherPid;
     pthread_attr_t dumperPid_tattr;
     pthread_attr_t watcherPid_tattr;
-
 #else
     PROCESS dumperPid, watcherPid;
 #endif
@@ -162,7 +161,7 @@ DumpDB(call, firstcall, maxLength, charListPtr, done)
        if (code)
            ERROR(errno);
 
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        /* Initialize the condition variables and the mutexes we use
         * to signal and synchronize the reader and writer threads.
         */
@@ -189,7 +188,7 @@ DumpDB(call, firstcall, maxLength, charListPtr, done)
        dumpSyncPtr->dumperPid = dumperPid;
        dumpSyncPtr->timeToLive = time(0) + DUMP_TTL_INC;
 
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        /* Initialize the thread attributes and launch the thread */
 
        assert(pthread_attr_init(&watcherPid_tattr) == 0);
@@ -217,7 +216,7 @@ DumpDB(call, firstcall, maxLength, charListPtr, done)
        if (dumpSyncPtr->ds_writerStatus == DS_WAITING) {
            LogDebug(6, "wakup writer\n");
            dumpSyncPtr->ds_writerStatus = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            assert(pthread_cond_broadcast(&dumpSyncPtr->ds_writerStatus_cond) == 0);
 #else
            code = LWP_SignalProcess(&dumpSyncPtr->ds_writerStatus);
@@ -228,7 +227,7 @@ DumpDB(call, firstcall, maxLength, charListPtr, done)
        LogDebug(6, "wait for writer\n");
        dumpSyncPtr->ds_readerStatus = DS_WAITING;
        ReleaseWriteLock(&dumpSyncPtr->ds_lock);
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
         assert(pthread_mutex_lock(&dumpSyncPtr->ds_readerStatus_mutex) == 0);
         assert(pthread_cond_wait(&dumpSyncPtr->ds_readerStatus_cond, &dumpSyncPtr->ds_readerStatus_mutex) == 0);
         assert(pthread_mutex_unlock(&dumpSyncPtr->ds_readerStatus_mutex) == 0);
@@ -259,7 +258,7 @@ DumpDB(call, firstcall, maxLength, charListPtr, done)
     dumpSyncPtr->ds_bytes -= readSize;
     if (dumpSyncPtr->ds_writerStatus == DS_WAITING) {
        dumpSyncPtr->ds_writerStatus = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        assert(pthread_cond_broadcast(&dumpSyncPtr->ds_writerStatus_cond) == 0);
 #else
        code = LWP_SignalProcess(&dumpSyncPtr->ds_writerStatus);
@@ -359,7 +358,7 @@ dumpWatcher(void *unused)
 
            close(dumpSyncPtr->pipeFid[0]);
            close(dumpSyncPtr->pipeFid[1]);
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            assert(pthread_cancel(dumpSyncPtr->dumperPid) == 0);
 #else
            code = LWP_DestroyProcess(dumpSyncPtr->dumperPid);
@@ -378,7 +377,7 @@ dumpWatcher(void *unused)
        }
        /*i */
        ReleaseWriteLock(&dumpSyncPtr->ds_lock);
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        sleep(5);
 #else
        IOMGR_Sleep(5);
index 4260e78..2625098 100644 (file)
@@ -61,7 +61,7 @@ struct dumpSyncS {
     struct Lock ds_lock;       /* for this struct. */
     afs_int32 statusFlags;     /* 0, or 1 for dump in progress */
     int pipeFid[2];            /* pipe between threads */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
     pthread_mutex_t ds_writerStatus_mutex;
     pthread_mutex_t ds_readerStatus_mutex;
     pthread_cond_t ds_writerStatus_cond;
index 00ab4c8..8f5e47c 100644 (file)
@@ -110,7 +110,7 @@ AwaitInitialization()
            start = time(0);
        else if (time(0) - start > 5)
            return UNOQUORUM;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        sleep(1);
 #else
        IOMGR_Sleep(1);
@@ -204,7 +204,7 @@ InitRPC(ut, lock, this_op)
                Log("Waiting for quorum election\n");
            if (wait < 15.0)
                wait *= 1.1;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            sleep((int)wait);
 #else
            IOMGR_Sleep((int)wait);
@@ -1477,7 +1477,7 @@ CreateDump(call, dump)
            }
 
            /* dump id is in use - wait a while */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            sleep(1);
 #else
            IOMGR_Sleep(1);
index 11a94dc..3809ffc 100644 (file)
@@ -41,7 +41,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                CSTATIC="-non_shared"
                DBG="-g3"
-               MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
                TXLIBS="-lcurses"
                XCFLAGS="-D_NO_PROTO -DOSF"
@@ -52,7 +52,7 @@ case $AFS_SYSNAME in
                LEX="flex -l"
                DBG="-g3"
                CSTATIC="-non_shared"
-               MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
                TXLIBS="-lcurses"
                XCFLAGS="-D_NO_PROTO -DOSF"
@@ -64,7 +64,7 @@ case $AFS_SYSNAME in
                DBG="-g3"
                CSTATIC="-non_shared"
                LWP_OPTMZ="-O2"
-               MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_REENTRANT=1 -pthread -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-pthread -lpthread -lmach -lexc -lc"
                TXLIBS="-lcurses"
                XCFLAGS="-D_NO_PROTO -DOSF"
@@ -74,7 +74,7 @@ case $AFS_SYSNAME in
        alpha_linux_22)
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -90,7 +90,7 @@ case $AFS_SYSNAME in
                CCOBJ="${CC} -fPIC"
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -106,7 +106,7 @@ case $AFS_SYSNAME in
                CCOBJ="${CC} -fPIC"
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -158,7 +158,7 @@ case $AFS_SYSNAME in
                LEX="/opt/langtools/bin/lex"
                LWP_OPTMZ="-O"
                MT_CC="/opt/ansic/bin/cc -Ae"
-               MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-L/opt/dce/lib -ldce"
                MV="/bin/mv"
                OPTMZ="-O"
@@ -187,7 +187,7 @@ case $AFS_SYSNAME in
                LEX="/opt/langtools/bin/lex"
                LWP_OPTMZ="-O"
                MT_CC="$CC"
-               MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread"
                MV="/bin/mv"
                OPTMZ="-O"
@@ -218,7 +218,7 @@ case $AFS_SYSNAME in
                LEX="/opt/langtools/bin/lex"
                LWP_OPTMZ=""
                MT_CC="$CC"
-               MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_POSIX_C_SOURCE=199506L -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread"
                MV="/bin/mv"
                OPTMZ="-O"
@@ -241,7 +241,7 @@ case $AFS_SYSNAME in
 
        *fbsd_*)
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-pthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-pipe -fPIC"
@@ -254,7 +254,7 @@ case $AFS_SYSNAME in
 
        *nbsd2*|*nbsd3*|*nbsd4*)
                LEX="flex -l"
-               MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -D_REENTRANT '
+               MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
                MT_LIBS="-lpthread" # XXX -pthread soon
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-pipe -fPIC"
@@ -281,7 +281,7 @@ case $AFS_SYSNAME in
        ia64_linux24|ia64_linux26)
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -296,7 +296,7 @@ case $AFS_SYSNAME in
                CCOBJ="${CC} -fPIC"
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -310,7 +310,7 @@ case $AFS_SYSNAME in
        ppc64_linux24)
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -324,7 +324,7 @@ case $AFS_SYSNAME in
        ppc64_linux26)
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -342,7 +342,7 @@ case $AFS_SYSNAME in
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -360,7 +360,7 @@ case $AFS_SYSNAME in
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                DBG=-g
                KERN_DBG=-g
@@ -381,7 +381,7 @@ case $AFS_SYSNAME in
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                DBG=-g
                KERN_DBG=-g
@@ -403,7 +403,7 @@ case $AFS_SYSNAME in
                MT_CC="gcc -pipe"
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                DBG=-g
                KERN_DBG=-g
@@ -423,7 +423,7 @@ case $AFS_SYSNAME in
                KRB5CFLAGS="-I/usr/include/kerberosV"
                KRB5LIBS="-lkrb5 -lcrypto"
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-pthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-pipe -fpic"
@@ -438,7 +438,7 @@ case $AFS_SYSNAME in
        parisc_linux24)
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -493,7 +493,7 @@ case $AFS_SYSNAME in
        ppc_darwin_70)
                AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
                LEX="lex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
                KROOT=
                KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
                LWP_OPTMZ="-O2"
@@ -508,7 +508,7 @@ case $AFS_SYSNAME in
        *_darwin_80)
                AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
                LEX="lex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
                KROOT=
                KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
                KERN_OPTMZ="-Os"
@@ -525,7 +525,7 @@ case $AFS_SYSNAME in
        *_darwin_90)
                AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
                LEX="lex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
                KROOT=
                KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
                LD="cc"
@@ -543,7 +543,7 @@ case $AFS_SYSNAME in
        ppc_linux*)
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -560,7 +560,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LIBSYS_AIX_EXP="afsl.exp"
                MT_CC="xlc_r"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthreads"
                SHLIB_SUFFIX="o"
                TXLIBS="-lcurses"
@@ -576,7 +576,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LIBSYS_AIX_EXP="afsl.exp"
                MT_CC="xlc_r"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthreads"
                SHLIB_SUFFIX="o"
                TXLIBS="-lcurses"
@@ -591,7 +591,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LIBSYS_AIX_EXP="afsl.exp"
                MT_CC="xlc_r"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthreads"
                SHLIB_SUFFIX="o"
                TXLIBS="-lcurses"
@@ -606,7 +606,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LIBSYS_AIX_EXP="afsl.exp"
                MT_CC="xlc_r"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthreads"
                SHLIB_SUFFIX="o"
                TXLIBS="-lcurses"
@@ -623,7 +623,7 @@ case $AFS_SYSNAME in
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CC="$CC"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -643,7 +643,7 @@ case $AFS_SYSNAME in
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CC="$CC"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -662,7 +662,7 @@ case $AFS_SYSNAME in
                KERN_OPTMZ=-O2
                LEX="flex -l"
                MT_CC="$CC"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -679,7 +679,7 @@ case $AFS_SYSNAME in
                AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
                FSINCLUDES="-I/usr/include/sys/fs"
                LEX="lex"
-               MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread"
                TXLIBS="-lcurses"
                XCFLAGS64="-64 -mips3"
@@ -693,7 +693,7 @@ case $AFS_SYSNAME in
                AFSD_LIBS="/usr/lib/libdwarf.a /usr/lib/libelf.a"
                FSINCLUDES="-I/usr/include/sys/fs"
                LEX="lex"
-               MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread"
                TXLIBS="-lcurses"
                XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
@@ -707,7 +707,7 @@ case $AFS_SYSNAME in
                AFSD_LIBS="/usr/lib32/libdwarf.a /usr/lib32/libelf.a"
                FSINCLUDES="-I/usr/include/sys/fs"
                LEX="lex"
-               MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread"
                TXLIBS="-lcurses"
                XCFLAGS64="-D_BSD_COMPAT -64 -mips3"
@@ -725,7 +725,7 @@ case $AFS_SYSNAME in
                LD="/usr/bin/ld"
                LEX="lex"
                MT_CC="/usr/bin/cc"
-               MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-D_SGI_MP_SOURCE -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread"
                TXLIBS="-lcurses"
                XCFLAGS64="-64 -mips3"
@@ -738,7 +738,7 @@ case $AFS_SYSNAME in
        sparc*_linux*)
                KERN_OPTMZ=-O2
                LEX="flex -l"
-               MT_CFLAGS='-DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+               MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
                MT_LIBS="-lpthread"
                PAM_OPTMZ=-O2
                PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
@@ -771,7 +771,7 @@ case $AFS_SYSNAME in
                CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                SHLIB_CFLAGS="-KPIC"
                TXLIBS="-lcurses"
@@ -789,7 +789,7 @@ case $AFS_SYSNAME in
                CCOBJ="/opt/SUNWspro/bin/cc"
                LEX="lex"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -811,7 +811,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -833,7 +833,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -855,7 +855,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -877,7 +877,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -899,7 +899,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -921,7 +921,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -942,7 +942,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -963,7 +963,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -984,7 +984,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
@@ -1005,7 +1005,7 @@ case $AFS_SYSNAME in
                LEX="lex"
                LD="/usr/ccs/bin/ld"
                MT_CC="/opt/SUNWspro/bin/cc"
-               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV -DUBIK_PTHREAD_ENV ${XCFLAGS}'
+               MT_CFLAGS='-mt -DAFS_PTHREAD_ENV ${XCFLAGS}'
                MT_LIBS="-lpthread -lsocket"
                PAM_CFLAGS="-KPIC"
                PAM_LIBS="-lc -lpam -lsocket -lnsl -lm"
index a507a8c..cab8595 100644 (file)
@@ -330,7 +330,7 @@ ubeacon_Interact(void *dummy)
                temp = POLLTIME;
            tt.tv_sec = temp;
            tt.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            code = select(0, 0, 0, 0, &tt);
 #else
            code = IOMGR_Select(0, 0, 0, 0, &tt);
@@ -451,12 +451,10 @@ ubeacon_Interact(void *dummy)
            ubik_amSyncSite = 1;
            syncSiteUntil = oldestYesVote + SMALLTIME;
 #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");
index fecfcd8..a32f7c5 100644 (file)
@@ -798,7 +798,7 @@ udisk_commit(struct ubik_trans *atrans)
        }
 
        dbase->version.counter++;       /* bump commit count */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        assert(pthread_cond_broadcast(&dbase->version_cond) == 0);
 #else
        LWP_NoYieldSignal(&dbase->version);
@@ -918,7 +918,7 @@ udisk_end(struct ubik_trans *atrans)
     free(atrans);
 
     /* Wakeup any writers waiting in BeginTrans() */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        assert(pthread_cond_broadcast(&dbase->flags_cond) == 0);
 #else
     LWP_NoYieldSignal(&dbase->flags);
index 04fd0b1..b6d1def 100644 (file)
@@ -24,7 +24,7 @@ RCSID
 #endif
 #include <sys/stat.h>
 
-/* #if defined (AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV) */
+/* #ifdef AFS_PTHREAD_ENV */
 #if 0   /* temporary hack - klm */
 /* nothing */
 #else
index eecef90..9b76e0d 100644 (file)
@@ -72,7 +72,7 @@ int
 urecovery_ResetState(void)
 {
     urecovery_state = 0;
-#if !defined(AFS_PTHREAD_ENV) || !defined(UBIK_PTHREAD_ENV)
+#if !defined(AFS_PTHREAD_ENV)
     /*  No corresponding LWP_WaitProcess found anywhere for this -- klm */
     LWP_NoYieldSignal(&urecovery_state);
 #endif
@@ -86,7 +86,7 @@ urecovery_ResetState(void)
 int
 urecovery_LostServer(void)
 {
-#if !defined(AFS_PTHREAD_ENV) || !defined(UBIK_PTHREAD_ENV)
+#if !defined(AFS_PTHREAD_ENV)
     /*  No corresponding LWP_WaitProcess found anywhere for this -- klm */
     LWP_NoYieldSignal(&urecovery_state);
     return 0;
@@ -369,7 +369,7 @@ InitializeDB(register struct ubik_dbase *adbase)
            adbase->version.counter = 0;
            (*adbase->setlabel) (adbase, 0, &adbase->version);
        }
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        assert(pthread_cond_broadcast(&adbase->version_cond) == 0);
 #else
        LWP_NoYieldSignal(&adbase->version);
@@ -453,7 +453,7 @@ urecovery_Interact(void *dummy)
        /* Run through this loop every 4 seconds */
        tv.tv_sec = 4;
        tv.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        select(0, 0, 0, 0, &tv);
 #else
        IOMGR_Select(0, 0, 0, 0, &tv);
@@ -694,7 +694,7 @@ urecovery_Interact(void *dummy)
                urecovery_state |= UBIK_RECHAVEDB;
            }
            udisk_Invalidate(ubik_dbase, 0);    /* data has changed */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            assert(pthread_cond_broadcast(&ubik_dbase->version_cond) == 0);
 #else
            LWP_NoYieldSignal(&ubik_dbase->version);
@@ -722,7 +722,7 @@ urecovery_Interact(void *dummy)
            code =
                (*ubik_dbase->setlabel) (ubik_dbase, 0, &ubik_dbase->version);
            udisk_Invalidate(ubik_dbase, 0);    /* data may have changed */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            assert(pthread_cond_broadcast(&ubik_dbase->version_cond) == 0);
 #else
            LWP_NoYieldSignal(&ubik_dbase->version);
@@ -755,7 +755,7 @@ urecovery_Interact(void *dummy)
                while ((ubik_dbase->flags & DBWRITING) && (safety < 500)) {
                    DBRELE(ubik_dbase);
                    /* sleep for a little while */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
                    select(0, 0, 0, 0, &tv);
 #else
                    IOMGR_Select(0, 0, 0, 0, &tv);
index 06965ae..2ed2a29 100644 (file)
@@ -628,7 +628,7 @@ SDISK_SendFile(rxcall, file, length, avers)
 #endif
     memcpy(&ubik_dbase->version, avers, sizeof(struct ubik_version));
     udisk_Invalidate(dbase, file);     /* new dbase, flush disk buffers */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
     assert(pthread_cond_broadcast(&dbase->version_cond) == 0);
 #else
     LWP_NoYieldSignal(&dbase->version);
index 9ca85f5..7d017b1 100644 (file)
@@ -189,7 +189,7 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort,
 {
     register struct ubik_dbase *tdb;
     register afs_int32 code;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
     pthread_t rxServerThread;        /* pthread variables */
     pthread_t ubeacon_InteractThread;
     pthread_t urecovery_InteractThread;
@@ -290,7 +290,7 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort,
      * UpdateInterfaceAddr RPC that occurs in ubeacon_InitServerList. This avoids
      * the "steplock" problem in ubik initialization. Defect 11037.
      */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
 /* do assert stuff */
     assert(pthread_attr_init(&rxServer_tattr) == 0);
     assert(pthread_attr_setdetachstate(&rxServer_tattr, PTHREAD_CREATE_DETACHED) == 0);
@@ -317,7 +317,7 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort,
        return code;
 
     /* now start up async processes */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
 /* do assert stuff */
     assert(pthread_attr_init(&ubeacon_Interact_tattr) == 0);
     assert(pthread_attr_setdetachstate(&ubeacon_Interact_tattr, PTHREAD_CREATE_DETACHED) == 0);
@@ -334,7 +334,7 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort,
        return code;
 #endif
 
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
 /* do assert stuff */
     assert(pthread_attr_init(&urecovery_Interact_tattr) == 0);
     assert(pthread_attr_setdetachstate(&urecovery_Interact_tattr, PTHREAD_CREATE_DETACHED) == 0);
@@ -427,7 +427,7 @@ BeginTrans(register struct ubik_dbase *dbase, afs_int32 transMode,
 #endif
                return UNOQUORUM;       /* a white lie */
            }
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            sleep(2);
 #else
            IOMGR_Sleep(2);
@@ -449,7 +449,7 @@ BeginTrans(register struct ubik_dbase *dbase, afs_int32 transMode,
        /* if we're writing already, wait */
        while (dbase->flags & DBWRITING) {
            DBRELE(dbase);
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
            assert(pthread_mutex_lock(&dbase->flags_mutex) == 0);
            assert(pthread_cond_wait(&dbase->flags_cond, &dbase->flags_mutex) == 0);
            assert(pthread_mutex_unlock(&dbase->flags_mutex) == 0);
@@ -644,7 +644,7 @@ ubik_EndTrans(register struct ubik_trans *transPtr)
                code = 1;
                tv.tv_sec = 1;  /* try again after a while (ha ha) */
                tv.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
                select(0, 0, 0, 0, &tv);
 #else
                IOMGR_Select(0, 0, 0, 0, &tv);  /* poll, should we wait on something? */
@@ -952,7 +952,7 @@ ubik_WaitVersion(register struct ubik_dbase *adatabase,
        /* wait until version # changes, and then return */
        if (vcmp(*aversion, adatabase->version) != 0)
            return 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        assert(pthread_mutex_lock(&adatabase->version_mutex) == 0);
        assert(pthread_cond_wait(&adatabase->version_cond,&adatabase->version_mutex) == 0);
        assert(pthread_mutex_unlock(&adatabase->version_mutex) == 0);
index 6cb8cde..690138f 100644 (file)
@@ -172,7 +172,7 @@ struct ubik_dbase {
     int (*getnfiles) (struct ubik_dbase * adbase);     /* find out number of files */
     short readers;             /* number of current read transactions */
     struct ubik_version cachedVersion; /* version of caller's cached data */
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
     pthread_cond_t version_cond;    /* condition variable to manage changes to version */
     pthread_cond_t flags_cond;      /* condition variable to manage changes to flags */
   pthread_mutex_t version_mutex;
index 6a0c86b..c6bdc77 100644 (file)
@@ -149,7 +149,7 @@ main(argc, argv)
 
                tv.tv_sec = 1;
                tv.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
                select(0, 0, 0, 0, &tv);
 #else
                IOMGR_Select(0, 0, 0, 0, &tv);
@@ -176,7 +176,7 @@ main(argc, argv)
 
                tv.tv_sec = 1;
                tv.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
                select(0, 0, 0, 0, &tv);
 #else
                IOMGR_Select(0, 0, 0, 0, &tv);
index a157abb..f58f449 100644 (file)
@@ -62,7 +62,7 @@ SAMPLE_Inc(rxconn)
     if (sleepTime) {
        tv.tv_sec = sleepTime;
        tv.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        select(0, 0, 0, 0, &tv);
 #else
        IOMGR_Select(0, 0, 0, 0, &tv);
@@ -122,7 +122,7 @@ SAMPLE_Get(rxconn, gnumber)
     if (sleepTime) {
        tv.tv_sec = sleepTime;
        tv.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        select(0, 0, 0, 0, &tv);
 #else
        IOMGR_Select(0, 0, 0, 0, &tv);
@@ -169,7 +169,7 @@ SAMPLE_QGet(rxconn, gnumber)
     if (sleepTime) {
        tv.tv_sec = sleepTime;
        tv.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        select(0, 0, 0, 0, &tv);
 #else
        IOMGR_Select(0, 0, 0, 0, &tv);
@@ -213,7 +213,7 @@ SAMPLE_Trun(rxconn)
     if (sleepTime) {
        tv.tv_sec = sleepTime;
        tv.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        select(0, 0, 0, 0, &tv);
 #else
        IOMGR_Select(0, 0, 0, 0, &tv);
@@ -258,7 +258,7 @@ SAMPLE_Test(rxconn)
     if (sleepTime) {
        tv.tv_sec = sleepTime;
        tv.tv_usec = 0;
-#if defined(AFS_PTHREAD_ENV) && defined(UBIK_PTHREAD_ENV)
+#ifdef AFS_PTHREAD_ENV
        select(0, 0, 0, 0, &tv);
 #else
        IOMGR_Select(0, 0, 0, 0, &tv);