From patchwork Mon Feb 1 13:22:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 76070 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o11DSYHR014302 for ; Mon, 1 Feb 2010 13:28:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753617Ab0BAN2d (ORCPT ); Mon, 1 Feb 2010 08:28:33 -0500 Received: from mail.mellanox.co.il ([194.90.237.43]:48519 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753149Ab0BAN2d (ORCPT ); Mon, 1 Feb 2010 08:28:33 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from kliteyn@dev.mellanox.co.il) with SMTP; 1 Feb 2010 15:28:27 +0200 Received: from [10.4.1.29] ([10.4.1.29]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Feb 2010 15:22:43 +0200 Message-ID: <4B66D598.3030401@dev.mellanox.co.il> Date: Mon, 01 Feb 2010 15:22:32 +0200 From: Yevgeny Kliteynik Reply-To: kliteyn@dev.mellanox.co.il User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky , Linux RDMA Subject: [PATCH] opensm/complib: redundant redeclarations X-OriginalArrivalTime: 01 Feb 2010 13:22:43.0187 (UTC) FILETIME=[A2BB5C30:01CAA341] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.000.1038-17166.007 X-TM-AS-Result: No--12.038600-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 01 Feb 2010 13:28:34 +0000 (UTC) diff --git a/opensm/include/complib/cl_atomic.h b/opensm/include/complib/cl_atomic.h index 92620ee..7e343d7 100644 --- a/opensm/include/complib/cl_atomic.h +++ b/opensm/include/complib/cl_atomic.h @@ -70,7 +70,9 @@ BEGIN_C_DECLS * * SYNOPSIS */ +#ifndef _OSD_CL_ATOMIC_INC int32_t cl_atomic_inc(IN atomic32_t * const p_value); +#endif /* * PARAMETERS * p_value @@ -101,7 +103,9 @@ int32_t cl_atomic_inc(IN atomic32_t * const p_value); * * SYNOPSIS */ +#ifndef _OSD_CL_ATOMIC_DEC int32_t cl_atomic_dec(IN atomic32_t * const p_value); +#endif /* * PARAMETERS * p_value @@ -132,8 +136,10 @@ int32_t cl_atomic_dec(IN atomic32_t * const p_value); * * SYNOPSIS */ +#ifndef _OSD_CL_ATOMIC_ADD int32_t cl_atomic_add(IN atomic32_t * const p_value, IN const int32_t increment); +#endif /* * PARAMETERS * p_value @@ -167,8 +173,10 @@ cl_atomic_add(IN atomic32_t * const p_value, IN const int32_t increment); * * SYNOPSIS */ +#ifndef _OSD_CL_ATOMIC_SUB int32_t cl_atomic_sub(IN atomic32_t * const p_value, IN const int32_t decrement); +#endif /* * PARAMETERS * p_value diff --git a/opensm/include/complib/cl_atomic_osd.h b/opensm/include/complib/cl_atomic_osd.h index ac14f8a..43d1b77 100644 --- a/opensm/include/complib/cl_atomic_osd.h +++ b/opensm/include/complib/cl_atomic_osd.h @@ -54,6 +54,7 @@ BEGIN_C_DECLS extern cl_spinlock_t cl_atomic_spinlock; +#define _OSD_CL_ATOMIC_INC static inline int32_t cl_atomic_inc(IN atomic32_t * const p_value) { int32_t new_val; @@ -65,6 +66,7 @@ static inline int32_t cl_atomic_inc(IN atomic32_t * const p_value) return (new_val); } +#define _OSD_CL_ATOMIC_DEC static inline int32_t cl_atomic_dec(IN atomic32_t * const p_value) { int32_t new_val; @@ -76,6 +78,7 @@ static inline int32_t cl_atomic_dec(IN atomic32_t * const p_value) return (new_val); } +#define _OSD_CL_ATOMIC_ADD static inline int32_t cl_atomic_add(IN atomic32_t * const p_value, IN const int32_t increment) { @@ -88,6 +91,7 @@ cl_atomic_add(IN atomic32_t * const p_value, IN const int32_t increment) return (new_val); } +#define _OSD_CL_ATOMIC_SUB static inline int32_t cl_atomic_sub(IN atomic32_t * const p_value, IN const int32_t decrement) { diff --git a/opensm/include/complib/cl_thread.h b/opensm/include/complib/cl_thread.h index 0a622a1..b7ee1ca 100644 --- a/opensm/include/complib/cl_thread.h +++ b/opensm/include/complib/cl_thread.h @@ -343,7 +343,9 @@ boolean_t cl_is_current_thread(IN const cl_thread_t * const p_thread); * * SYNOPSIS */ +#ifndef _OSD_CL_IS_BLOCKABLE boolean_t cl_is_blockable(void); +#endif /* * RETURN VALUE * TRUE diff --git a/opensm/include/complib/cl_thread_osd.h b/opensm/include/complib/cl_thread_osd.h index ad7df90..50fb6f7 100644 --- a/opensm/include/complib/cl_thread_osd.h +++ b/opensm/include/complib/cl_thread_osd.h @@ -59,6 +59,7 @@ typedef struct _cl_thread_osd_t { cl_state_t state; } cl_thread_osd_t; +#define _OSD_CL_IS_BLOCKABLE static inline boolean_t cl_is_blockable(void) { return TRUE;