diff mbox

opensm/complib: redundant redeclarations

Message ID 4B66D598.3030401@dev.mellanox.co.il (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Yevgeny Kliteynik Feb. 1, 2010, 1:22 p.m. UTC
None
diff mbox

Patch

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;