From 633ee3c2ce0856598e24a5f14004ec81b8f260a7 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Thu, 12 Apr 2007 04:29:43 +0000 Subject: [PATCH] Small optimizations in order to force the compiler to inline some critical functions. This commit was SVN r14317. --- opal/class/opal_object.h | 1 + opal/threads/mutex.h | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/opal/class/opal_object.h b/opal/class/opal_object.h index 9449fcdc78..948ff4cefa 100644 --- a/opal/class/opal_object.h +++ b/opal/class/opal_object.h @@ -488,6 +488,7 @@ static inline opal_object_t *opal_obj_new(opal_class_t * cls) * @param inc Increment by which to update reference count * @return New value of the reference count */ +static inline int opal_obj_update(opal_object_t *object, int inc) __opal_attribute_always_inline__; static inline int opal_obj_update(opal_object_t *object, int inc) { #if OMPI_HAVE_THREAD_SUPPORT diff --git a/opal/threads/mutex.h b/opal/threads/mutex.h index 1fb2d7045e..c66bdb645d 100644 --- a/opal/threads/mutex.h +++ b/opal/threads/mutex.h @@ -132,11 +132,7 @@ static inline void opal_mutex_atomic_unlock(opal_mutex_t *mutex); * possibility that we may have multiple threads, true will be * returned. */ -static inline bool opal_using_threads(void) -{ - return opal_uses_threads; -} - +#define opal_using_threads() opal_uses_threads /** * Set whether the process is using multiple threads or not.