diff options
author | Johannes Lundberg <johalun@FreeBSD.org> | 2019-06-21 16:43:16 +0000 |
---|---|---|
committer | Johannes Lundberg <johalun@FreeBSD.org> | 2019-06-21 16:43:16 +0000 |
commit | 62260f68b48b6bc3b6398c5c35b10696def93dba (patch) | |
tree | 31f3f0b9b488e12635ee998fe417bff72dfb874e /sys/compat/linuxkpi/common/include/asm | |
parent | 83b319101ff242dd9b21946a66bcf6b54d408cf3 (diff) | |
download | src-62260f68b48b6bc3b6398c5c35b10696def93dba.tar.gz src-62260f68b48b6bc3b6398c5c35b10696def93dba.zip |
LinuxKPI: Add atomic_long_sub macro.
Reviewed by: imp (mentor), hps
Approved by: imp (mentor), hps
MFC after: 1 week
Differential Revision: D20718
Notes
Notes:
svn path=/head/; revision=349276
Diffstat (limited to 'sys/compat/linuxkpi/common/include/asm')
-rw-r--r-- | sys/compat/linuxkpi/common/include/asm/atomic-long.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/asm/atomic-long.h b/sys/compat/linuxkpi/common/include/asm/atomic-long.h index d7f839f2541f..108d7f4f7b3a 100644 --- a/sys/compat/linuxkpi/common/include/asm/atomic-long.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic-long.h @@ -42,6 +42,7 @@ typedef struct { } atomic_long_t; #define atomic_long_add(i, v) atomic_long_add_return((i), (v)) +#define atomic_long_sub(i, v) atomic_long_add_return(-(i), (v)) #define atomic_long_inc_return(v) atomic_long_add_return(1, (v)) #define atomic_long_inc_not_zero(v) atomic_long_add_unless((v), 1, 0) |