aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/spinlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/spinlock.c')
-rw-r--r--kernel/spinlock.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/kernel/spinlock.c b/kernel/spinlock.c
index fb524b009eef..d48143eafbfd 100644
--- a/kernel/spinlock.c
+++ b/kernel/spinlock.c
@@ -7,6 +7,11 @@
7 * 7 *
8 * This file contains the spinlock/rwlock implementations for the 8 * This file contains the spinlock/rwlock implementations for the
9 * SMP and the DEBUG_SPINLOCK cases. (UP-nondebug inlines them) 9 * SMP and the DEBUG_SPINLOCK cases. (UP-nondebug inlines them)
10 *
11 * Note that some architectures have special knowledge about the
12 * stack frames of these functions in their profile_pc. If you
13 * change anything significant here that could change the stack
14 * frame contact the architecture maintainers.
10 */ 15 */
11 16
12#include <linux/linkage.h> 17#include <linux/linkage.h>
@@ -16,17 +21,6 @@
16#include <linux/debug_locks.h> 21#include <linux/debug_locks.h>
17#include <linux/module.h> 22#include <linux/module.h>
18 23
19/*
20 * Generic declaration of the raw read_trylock() function,
21 * architectures are supposed to optimize this:
22 */
23int __lockfunc generic__raw_read_trylock(raw_rwlock_t *lock)
24{
25 __raw_read_lock(lock);
26 return 1;
27}
28EXPORT_SYMBOL(generic__raw_read_trylock);
29
30int __lockfunc _spin_trylock(spinlock_t *lock) 24int __lockfunc _spin_trylock(spinlock_t *lock)
31{ 25{
32 preempt_disable(); 26 preempt_disable();