From c8842181d1aeccba45d7df89519ed7ee66f91482 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Sun, 12 Feb 2006 05:36:00 +0000 Subject: [PATCH] Correct the obj_update for the threaded mode. This commit was SVN r8988. --- opal/class/opal_object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opal/class/opal_object.h b/opal/class/opal_object.h index c1f5222737..0993c2e190 100644 --- a/opal/class/opal_object.h +++ b/opal/class/opal_object.h @@ -172,7 +172,7 @@ struct opal_class_t { */ struct opal_object_t { opal_class_t *obj_class; /**< class descriptor */ - volatile int obj_reference_count; /**< reference count */ + volatile int32_t obj_reference_count; /**< reference count */ #if OMPI_ENABLE_DEBUG const char* cls_init_file_name; /**< In debug mode store the file where the object get contructed */ int cls_init_lineno; /**< In debug mode store the line number where the object get contructed */ @@ -448,7 +448,7 @@ static inline opal_object_t *opal_obj_new(size_t size, opal_class_t * cls) static inline int opal_obj_update(opal_object_t *object, int inc) { #if OMPI_HAVE_THREAD_SUPPORT - return opal_atomic_add(&(object->obj_reference_count), inc ); + return opal_atomic_add_32(&(object->obj_reference_count), inc ); #else object->obj_reference_count += inc; return object->obj_reference_count;