Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1316
b: refs/heads/master
c: 10f02d1
h: refs/heads/master
v: v3
  • Loading branch information
Samuel Thibault authored and Linus Torvalds committed May 21, 2005
1 parent a587ef9 commit edf17aa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9636273dae265b9354b861b373cd43cd76a6d0fe
refs/heads/master: 10f02d1c59e55f529140dda3a92f0099d748451c
8 changes: 4 additions & 4 deletions trunk/include/linux/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ typedef struct {

#define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \
_raw_spin_trylock(lock) ? \
1 : ({preempt_enable(); local_bh_enable(); 0;});})
1 : ({preempt_enable_no_resched(); local_bh_enable(); 0;});})

#define _spin_lock(lock) \
do { \
Expand Down Expand Up @@ -383,15 +383,15 @@ do { \
#define _spin_unlock_bh(lock) \
do { \
_raw_spin_unlock(lock); \
preempt_enable(); \
preempt_enable_no_resched(); \
local_bh_enable(); \
__release(lock); \
} while (0)

#define _write_unlock_bh(lock) \
do { \
_raw_write_unlock(lock); \
preempt_enable(); \
preempt_enable_no_resched(); \
local_bh_enable(); \
__release(lock); \
} while (0)
Expand Down Expand Up @@ -423,8 +423,8 @@ do { \
#define _read_unlock_bh(lock) \
do { \
_raw_read_unlock(lock); \
preempt_enable_no_resched(); \
local_bh_enable(); \
preempt_enable(); \
__release(lock); \
} while (0)

Expand Down
8 changes: 4 additions & 4 deletions trunk/kernel/spinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ EXPORT_SYMBOL(_spin_unlock_irq);
void __lockfunc _spin_unlock_bh(spinlock_t *lock)
{
_raw_spin_unlock(lock);
preempt_enable();
preempt_enable_no_resched();
local_bh_enable();
}
EXPORT_SYMBOL(_spin_unlock_bh);
Expand All @@ -318,7 +318,7 @@ EXPORT_SYMBOL(_read_unlock_irq);
void __lockfunc _read_unlock_bh(rwlock_t *lock)
{
_raw_read_unlock(lock);
preempt_enable();
preempt_enable_no_resched();
local_bh_enable();
}
EXPORT_SYMBOL(_read_unlock_bh);
Expand All @@ -342,7 +342,7 @@ EXPORT_SYMBOL(_write_unlock_irq);
void __lockfunc _write_unlock_bh(rwlock_t *lock)
{
_raw_write_unlock(lock);
preempt_enable();
preempt_enable_no_resched();
local_bh_enable();
}
EXPORT_SYMBOL(_write_unlock_bh);
Expand All @@ -354,7 +354,7 @@ int __lockfunc _spin_trylock_bh(spinlock_t *lock)
if (_raw_spin_trylock(lock))
return 1;

preempt_enable();
preempt_enable_no_resched();
local_bh_enable();
return 0;
}
Expand Down

0 comments on commit edf17aa

Please sign in to comment.