@@ -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
@@ -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)
{
@@ -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
@@ -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;