linuxkpi: atomic: Add atomic_fetch_inc
Reviewed by: hselasky Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D35936
This commit is contained in:
parent
63167eb48c
commit
6be89cc88d
@ -307,6 +307,13 @@ static inline int atomic_fetch_##op(int i, atomic_t *v) \
|
||||
return (c); \
|
||||
}
|
||||
|
||||
static inline int
|
||||
atomic_fetch_inc(atomic_t *v)
|
||||
{
|
||||
|
||||
return ((atomic_inc_return(v) - 1));
|
||||
}
|
||||
|
||||
LINUX_ATOMIC_OP(or, |)
|
||||
LINUX_ATOMIC_OP(and, &)
|
||||
LINUX_ATOMIC_OP(andnot, &~)
|
||||
|
Loading…
Reference in New Issue
Block a user