qcacld-3.0: Support atomic sub in cdf

qcacld-2.0 to qcacld-3.0 propagation

support atomic_sub in cdf

Change-Id: Ie03c786f96533063b429fa3ea011e6e05c9504e2
CRs-Fixed: 938145
This commit is contained in:
Houston Hoffman 2015-12-06 20:29:12 -08:00 • committed by Satish Singh
commit 4cf4763fb1
2 changed files with 24 additions and 0 deletions

View file

@ -101,6 +101,18 @@ static inline void cdf_atomic_add(int i, cdf_atomic_t *v)
__cdf_atomic_add(i, v);
}
/**
* cdf_atomic_sub() - Subtract a value from an atomic variable.
* @i: the amount by which to decrease the atomic counter
* @v: a pointer to an opaque atomic variable
*
* Return: none
*/
static inline void cdf_atomic_sub(int i, cdf_atomic_t *v)
{
__cdf_atomic_sub(i, v);
}
/**
* cdf_atomic_dec_and_test() - decrement an atomic variable and check if the
* new value is zero

View file

@ -60,6 +60,18 @@ static inline void __cdf_atomic_add(int i, __cdf_atomic_t *v)
atomic_add(i, v);
}
/**
* cdf_atomic_sub() - Subtract a value from an atomic variable
* @i: the amount by which to decrease the atomic counter
* @v: a pointer to an opaque atomic variable
*
* Return: none
*/
static inline void __cdf_atomic_sub(int i, __cdf_atomic_t *v)
{
atomic_sub(i, v);
}
static inline uint32_t __cdf_atomic_dec_and_test(__cdf_atomic_t *v)
{
return atomic_dec_and_test(v);