From 4bb7537c493db080b914fc6201a9c9835c7eefcb Mon Sep 17 00:00:00 2001 From: scjody Date: Wed, 2 May 2007 22:58:06 +0000 Subject: [PATCH] Branch b1_4 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 | 2 +- lnet/include/lnet/lib-types.h | 2 +- lnet/lnet/api-ni.c | 6 +++--- lnet/lnet/lib-eq.c | 4 ++-- lnet/lnet/lib-msg.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lnet/include/lnet/lib-lnet.h b/lnet/include/lnet/lib-lnet.h index 25ab308..700059c 100644 --- a/lnet/include/lnet/lib-lnet.h +++ b/lnet/include/lnet/lib-lnet.h @@ -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 -# if !HAVE_LIBPTHREAD +# ifndef HAVE_LIBPTHREAD #define LNET_SINGLE_THREADED_LOCK(l) \ do { \ LASSERT ((l) == 0); \ diff --git a/lnet/include/lnet/lib-types.h b/lnet/include/lnet/lib-types.h index 2227c6a..b7d09cd 100644 --- a/lnet/include/lnet/lib-types.h +++ b/lnet/include/lnet/lib-types.h @@ -465,7 +465,7 @@ typedef struct 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; diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index cdf1a01..a071d39 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -186,7 +186,7 @@ lnet_get_portals_compatibility(void) return 0; } -# if !HAVE_LIBPTHREAD +# ifndef HAVE_LIBPTHREAD void lnet_init_locks(void) { @@ -1059,7 +1059,7 @@ lnet_startup_lndnis (void) 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)); @@ -1146,7 +1146,7 @@ LNetInit(void) # ifdef CRAY_XT3 LNET_REGISTER_ULND(the_ptllnd); # endif -# if HAVE_LIBPTHREAD +# ifdef HAVE_LIBPTHREAD LNET_REGISTER_ULND(the_tcplnd); # endif #endif diff --git a/lnet/lnet/lib-eq.c b/lnet/lnet/lib-eq.c index 98adecc..5bae602 100644 --- a/lnet/lnet/lib-eq.c +++ b/lnet/lnet/lib-eq.c @@ -185,7 +185,7 @@ LNetEQPoll (lnet_handle_eq_t *eventqs, int neq, int timeout_ms, #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; @@ -283,7 +283,7 @@ LNetEQPoll (lnet_handle_eq_t *eventqs, int neq, int timeout_ms, 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(); diff --git a/lnet/lnet/lib-msg.c b/lnet/lnet/lib-msg.c index a9834b5..d29aa1e 100644 --- a/lnet/lnet/lib-msg.c +++ b/lnet/lnet/lib-msg.c @@ -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 !HAVE_LIBPTHREAD +# ifndef HAVE_LIBPTHREAD /* LNetEQPoll() calls into _the_ LND to wait for action */ # else /* Wake anyone waiting in LNetEQPoll() */ -- 1.8.3.1