From 3e863815338fc8c5705fdf9093862d1a0e5c153a Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 31 May 2006 13:48:21 +0000 Subject: [PATCH] Add thread protection -- must only construct the alock when we have threading support. This commit was SVN r10138. --- ompi/attribute/attribute.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ompi/attribute/attribute.c b/ompi/attribute/attribute.c index cdf4d0f3a6..9841e41650 100644 --- a/ompi/attribute/attribute.c +++ b/ompi/attribute/attribute.c @@ -479,7 +479,9 @@ int ompi_attr_init(void) } } +#if OMPI_HAVE_THREAD_SUPPORT OBJ_CONSTRUCT(&alock, opal_mutex_t); +#endif if (OMPI_SUCCESS != (ret = opal_hash_table_init(keyval_hash, ATTR_TABLE_SIZE))) {