projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify and improve double-free check
[musl]
/
arch
/
i386
/
atomic.h
diff --git
a/arch/i386/atomic.h
b/arch/i386/atomic.h
index
bf3c336
..
66059af
100644
(file)
--- a/
arch/i386/atomic.h
+++ b/
arch/i386/atomic.h
@@
-1,5
+1,5
@@
-#ifndef _INTERNA
A
_ATOMIC_H
-#define _INTERNA
A
_ATOMIC_H
+#ifndef _INTERNA
L
_ATOMIC_H
+#define _INTERNA
L
_ATOMIC_H
#include <stdint.h>
#include <stdint.h>
@@
-11,6
+11,12
@@
static inline int a_ctz_64(uint64_t x)
return r;
}
return r;
}
+static inline int a_ctz_l(unsigned long x)
+{
+ long r;
+ __asm__( "bsf %1,%0" : "=r"(r) : "r"(x) );
+ return r;
+}
static inline void a_and_64(volatile uint64_t *p, uint64_t v)
{
static inline void a_and_64(volatile uint64_t *p, uint64_t v)
{