projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5aa7254
)
backports: add atomic64_set()
author
Hauke Mehrtens
<hauke@hauke-m.de>
Fri, 21 Feb 2014 17:59:25 +0000
(18:59 +0100)
committer
Hauke Mehrtens
<hauke@hauke-m.de>
Sun, 23 Feb 2014 23:06:22 +0000
(
00:06
+0100)
atomic64_set() is now used by mac80211 and it is not available on some
old arm kernels.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backport/compat/compat_atomic.c
patch
|
blob
|
history
diff --git
a/backport/compat/compat_atomic.c
b/backport/compat/compat_atomic.c
index f91ae757f42f639a72266713414cf6ccb7b2fc92..5ced5a490ed066300959a718c1f0548d68f38b65 100644
(file)
--- a/
backport/compat/compat_atomic.c
+++ b/
backport/compat/compat_atomic.c
@@
-17,6
+17,16
@@
long long atomic64_read(const atomic64_t *v)
}
EXPORT_SYMBOL_GPL(atomic64_read);
+void atomic64_set(atomic64_t *v, long long i)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&lock, flags);
+ v->counter = i;
+ spin_unlock_irqrestore(&lock, flags);
+}
+EXPORT_SYMBOL_GPL(atomic64_set);
+
long long atomic64_add_return(long long a, atomic64_t *v)
{
unsigned long flags;