mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
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:
parent
67056b2870
commit
4cf4763fb1
2 changed files with 24 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue