Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47438
b: refs/heads/master
c: 047c7c4
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Kosina authored and Linus Torvalds committed Feb 11, 2007
1 parent 1b3fedf commit 297008c
Show file tree
Hide file tree
Showing 3 changed files with 5 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: 7c101b7b13707f84791441fd04f11cf710d0d2d9
refs/heads/master: 047c7c42327433a13ed2971de41ef7c6943b37ec
9 changes: 3 additions & 6 deletions trunk/include/asm-cris/semaphore-helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem)
unsigned long flags;
int ret = 0;

local_save_flags(flags);
local_irq_disable();
local_irq_save(flags);
if (read(&sem->waking) > 0) {
dec(&sem->waking);
ret = 1;
Expand All @@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem,
int ret = 0;
unsigned long flags;

local_save_flags(flags);
local_irq_disable();
local_irq_save(flags);
if (read(&sem->waking) > 0) {
dec(&sem->waking);
ret = 1;
Expand All @@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem)
int ret = 1;
unsigned long flags;

local_save_flags(flags);
local_irq_disable();
local_irq_save(flags);
if (read(&sem->waking) <= 0)
inc(&sem->count);
else {
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/asm-cris/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
/* since Etrax doesn't have any atomic xchg instructions, we need to disable
irq's (if enabled) and do it with move.d's */
unsigned long flags,temp;
local_save_flags(flags); /* save flags, including irq enable bit */
local_irq_disable(); /* shut off irq's */
local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */
switch (size) {
case 1:
*((unsigned char *)&temp) = x;
Expand Down

0 comments on commit 297008c

Please sign in to comment.