Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210155
b: refs/heads/master
c: 3ab61eb
h: refs/heads/master
i:
  210153: 79f288b
  210151: 23793bd
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Sep 7, 2010
1 parent 9ec2c21 commit c102204
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: 7a2e8a8faab76386d8eaae9ded739ee5615be174
refs/heads/master: 3ab61eb9fd751336d1b3ad50ec7704bd3b62213f
15 changes: 10 additions & 5 deletions trunk/arch/h8300/include/asm/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

static __inline__ int atomic_add_return(int i, atomic_t *v)
{
int ret,flags;
unsigned long flags;
int ret;
local_irq_save(flags);
ret = v->counter += i;
local_irq_restore(flags);
Expand All @@ -30,7 +31,8 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)

static __inline__ int atomic_sub_return(int i, atomic_t *v)
{
int ret,flags;
unsigned long flags;
int ret;
local_irq_save(flags);
ret = v->counter -= i;
local_irq_restore(flags);
Expand All @@ -42,7 +44,8 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)

static __inline__ int atomic_inc_return(atomic_t *v)
{
int ret,flags;
unsigned long flags;
int ret;
local_irq_save(flags);
v->counter++;
ret = v->counter;
Expand All @@ -64,7 +67,8 @@ static __inline__ int atomic_inc_return(atomic_t *v)

static __inline__ int atomic_dec_return(atomic_t *v)
{
int ret,flags;
unsigned long flags;
int ret;
local_irq_save(flags);
--v->counter;
ret = v->counter;
Expand All @@ -76,7 +80,8 @@ static __inline__ int atomic_dec_return(atomic_t *v)

static __inline__ int atomic_dec_and_test(atomic_t *v)
{
int ret,flags;
unsigned long flags;
int ret;
local_irq_save(flags);
--v->counter;
ret = v->counter;
Expand Down

0 comments on commit c102204

Please sign in to comment.