git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
include
/
asm-sparc64
/
spinlock.h
diff --git
a/include/asm-sparc64/spinlock.h
b/include/asm-sparc64/spinlock.h
index
f5b09c7
..
08a6e55
100644
(file)
--- a/
include/asm-sparc64/spinlock.h
+++ b/
include/asm-sparc64/spinlock.h
@@
-78,6
+78,8
@@
static __inline__ void _raw_spin_unlock(spinlock_t *lock)
: "memory");
}
: "memory");
}
+extern void _raw_spin_lock_flags(spinlock_t *lock, unsigned long flags);
+
#else /* !(CONFIG_DEBUG_SPINLOCK) */
typedef struct {
#else /* !(CONFIG_DEBUG_SPINLOCK) */
typedef struct {
@@
-103,6
+105,7
@@
extern int _spin_trylock (spinlock_t *lock);
#define _raw_spin_trylock(lp) _spin_trylock(lp)
#define _raw_spin_lock(lock) _do_spin_lock(lock, "spin_lock")
#define _raw_spin_unlock(lock) _do_spin_unlock(lock)
#define _raw_spin_trylock(lp) _spin_trylock(lp)
#define _raw_spin_lock(lock) _do_spin_lock(lock, "spin_lock")
#define _raw_spin_unlock(lock) _do_spin_unlock(lock)
+#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock)
#endif /* CONFIG_DEBUG_SPINLOCK */
#endif /* CONFIG_DEBUG_SPINLOCK */
@@
-142,6
+145,7
@@
extern void _do_read_lock(rwlock_t *rw, char *str);
extern void _do_read_unlock(rwlock_t *rw, char *str);
extern void _do_write_lock(rwlock_t *rw, char *str);
extern void _do_write_unlock(rwlock_t *rw);
extern void _do_read_unlock(rwlock_t *rw, char *str);
extern void _do_write_lock(rwlock_t *rw, char *str);
extern void _do_write_unlock(rwlock_t *rw);
+extern int _do_write_trylock(rwlock_t *rw, char *str);
#define _raw_read_lock(lock) \
do { unsigned long flags; \
#define _raw_read_lock(lock) \
do { unsigned long flags; \
@@
-171,6
+175,15
@@
do { unsigned long flags; \
local_irq_restore(flags); \
} while(0)
local_irq_restore(flags); \
} while(0)
+#define _raw_write_trylock(lock) \
+({ unsigned long flags; \
+ int val; \
+ local_irq_save(flags); \
+ val = _do_write_trylock(lock, "write_trylock"); \
+ local_irq_restore(flags); \
+ val; \
+})
+
#endif /* CONFIG_DEBUG_SPINLOCK */
#endif /* !(__ASSEMBLY__) */
#endif /* CONFIG_DEBUG_SPINLOCK */
#endif /* !(__ASSEMBLY__) */