Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133262
b: refs/heads/master
c: 84fdf6c
h: refs/heads/master
v: v3
  • Loading branch information
Matt Fleming authored and Paul Mundt committed Jan 29, 2009
1 parent acf41fb commit 6650c86
Show file tree
Hide file tree
Showing 2 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: 42990701f938b9318e46102d9919ceb28e5b0e6d
refs/heads/master: 84fdf6cda30df72994baa2496da86787fb44cbb4
16 changes: 8 additions & 8 deletions trunk/arch/sh/include/asm/atomic-irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static inline void atomic_add(int i, atomic_t *v)
unsigned long flags;

local_irq_save(flags);
*(long *)v += i;
v->counter += i;
local_irq_restore(flags);
}

Expand All @@ -20,7 +20,7 @@ static inline void atomic_sub(int i, atomic_t *v)
unsigned long flags;

local_irq_save(flags);
*(long *)v -= i;
v->counter -= i;
local_irq_restore(flags);
}

Expand All @@ -29,9 +29,9 @@ static inline int atomic_add_return(int i, atomic_t *v)
unsigned long temp, flags;

local_irq_save(flags);
temp = *(long *)v;
temp = v->counter;
temp += i;
*(long *)v = temp;
v->counter = temp;
local_irq_restore(flags);

return temp;
Expand All @@ -42,9 +42,9 @@ static inline int atomic_sub_return(int i, atomic_t *v)
unsigned long temp, flags;

local_irq_save(flags);
temp = *(long *)v;
temp = v->counter;
temp -= i;
*(long *)v = temp;
v->counter = temp;
local_irq_restore(flags);

return temp;
Expand All @@ -55,7 +55,7 @@ static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
unsigned long flags;

local_irq_save(flags);
*(long *)v &= ~mask;
v->counter &= ~mask;
local_irq_restore(flags);
}

Expand All @@ -64,7 +64,7 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
unsigned long flags;

local_irq_save(flags);
*(long *)v |= mask;
v->counter |= mask;
local_irq_restore(flags);
}

Expand Down

0 comments on commit 6650c86

Please sign in to comment.