Whamcloud - gitweb
Branch b1_4
authorscjody <scjody>
Wed, 2 May 2007 22:58:06 +0000 (22:58 +0000)
committerscjody <scjody>
Wed, 2 May 2007 22:58:06 +0000 (22:58 +0000)
Fix build errors on catamount related to HAVE_LIBPTHREAD not being defined.

Original patch by walter.

b=12147
i=adilger
i=scjody

lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-types.h
lnet/lnet/api-ni.c
lnet/lnet/lib-eq.c
lnet/lnet/lib-msg.c

index 25ab308..700059c 100644 (file)
@@ -62,7 +62,7 @@ static inline int lnet_md_unlinkable (lnet_libmd_t *md)
 #define LNET_MUTEX_DOWN(m) mutex_down(m)
 #define LNET_MUTEX_UP(m)   mutex_up(m)
 #else
 #define LNET_MUTEX_DOWN(m) mutex_down(m)
 #define LNET_MUTEX_UP(m)   mutex_up(m)
 #else
-# if !HAVE_LIBPTHREAD
+# ifndef HAVE_LIBPTHREAD
 #define LNET_SINGLE_THREADED_LOCK(l)            \
 do {                                            \
         LASSERT ((l) == 0);                     \
 #define LNET_SINGLE_THREADED_LOCK(l)            \
 do {                                            \
         LASSERT ((l) == 0);                     \
index 2227c6a..b7d09cd 100644 (file)
@@ -465,7 +465,7 @@ typedef struct
         struct semaphore   ln_api_mutex;
         struct semaphore   ln_lnd_mutex;
 #else
         struct semaphore   ln_api_mutex;
         struct semaphore   ln_lnd_mutex;
 #else
-# if !HAVE_LIBPTHREAD
+# ifndef HAVE_LIBPTHREAD
         int                ln_lock;
         int                ln_api_mutex;
         int                ln_lnd_mutex;
         int                ln_lock;
         int                ln_api_mutex;
         int                ln_lnd_mutex;
index cdf1a01..a071d39 100644 (file)
@@ -186,7 +186,7 @@ lnet_get_portals_compatibility(void)
         return 0;
 }
 
         return 0;
 }
 
-# if !HAVE_LIBPTHREAD
+# ifndef HAVE_LIBPTHREAD
 
 void lnet_init_locks(void)
 {
 
 void lnet_init_locks(void)
 {
@@ -1059,7 +1059,7 @@ lnet_startup_lndnis (void)
                                 the_lnet.ln_eqwaitni = ni;
                         }
                 } else {
                                 the_lnet.ln_eqwaitni = ni;
                         }
                 } else {
-# if !HAVE_LIBPTHREAD
+# ifndef HAVE_LIBPTHREAD
                         LCONSOLE_ERROR("LND %s not supported in a "
                                        "single-threaded runtime\n",
                                        libcfs_lnd2str(lnd_type));
                         LCONSOLE_ERROR("LND %s not supported in a "
                                        "single-threaded runtime\n",
                                        libcfs_lnd2str(lnd_type));
@@ -1146,7 +1146,7 @@ LNetInit(void)
 # ifdef CRAY_XT3
         LNET_REGISTER_ULND(the_ptllnd);
 # endif
 # ifdef CRAY_XT3
         LNET_REGISTER_ULND(the_ptllnd);
 # endif
-# if HAVE_LIBPTHREAD
+# ifdef HAVE_LIBPTHREAD
         LNET_REGISTER_ULND(the_tcplnd);
 # endif
 #endif
         LNET_REGISTER_ULND(the_tcplnd);
 # endif
 #endif
index 98adecc..5bae602 100644 (file)
@@ -185,7 +185,7 @@ LNetEQPoll (lnet_handle_eq_t *eventqs, int neq, int timeout_ms,
 #else
         struct timeval   then;
         struct timeval   now;
 #else
         struct timeval   then;
         struct timeval   now;
-# if HAVE_LIBPTHREAD
+# ifdef HAVE_LIBPTHREAD
         struct timespec  ts;
 # endif
         lnet_ni_t       *eqwaitni = the_lnet.ln_eqwaitni;
         struct timespec  ts;
 # endif
         lnet_ni_t       *eqwaitni = the_lnet.ln_eqwaitni;
@@ -283,7 +283,7 @@ LNetEQPoll (lnet_handle_eq_t *eventqs, int neq, int timeout_ms,
                         RETURN (0);
                 }
 
                         RETURN (0);
                 }
 
-# if !HAVE_LIBPTHREAD
+# ifndef HAVE_LIBPTHREAD
                 /* If I'm single-threaded, LNET fails at startup if it can't
                  * set the_lnet.ln_eqwaitni correctly.  */
                 LBUG();
                 /* If I'm single-threaded, LNET fails at startup if it can't
                  * set the_lnet.ln_eqwaitni correctly.  */
                 LBUG();
index a9834b5..d29aa1e 100644 (file)
@@ -54,7 +54,7 @@ lnet_enq_event_locked (lnet_eq_t *eq, lnet_event_t *ev)
         if (cfs_waitq_active(&the_lnet.ln_waitq))
                 cfs_waitq_broadcast(&the_lnet.ln_waitq);
 #else
         if (cfs_waitq_active(&the_lnet.ln_waitq))
                 cfs_waitq_broadcast(&the_lnet.ln_waitq);
 #else
-# if !HAVE_LIBPTHREAD
+# ifndef HAVE_LIBPTHREAD
         /* LNetEQPoll() calls into _the_ LND to wait for action */
 # else
         /* Wake anyone waiting in LNetEQPoll() */
         /* LNetEQPoll() calls into _the_ LND to wait for action */
 # else
         /* Wake anyone waiting in LNetEQPoll() */