Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260451
b: refs/heads/master
c: f6081bd
h: refs/heads/master
i:
  260449: 1e49d29
  260447: 42d212a
v: v3
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Jul 26, 2011
1 parent 50935f0 commit a094d1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 3eea44ea753923c6af90be808426ecddc482de61
refs/heads/master: f6081bd3f8152cdd3d857f55631bbb4b72182b82
11 changes: 9 additions & 2 deletions trunk/include/asm-generic/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,20 @@ static inline int __atomic_add_unless(atomic_t *v, int a, int u)
return c;
}

static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
/**
* atomic_clear_mask - Atomically clear bits in atomic variable
* @mask: Mask of the bits to be cleared
* @v: pointer of type atomic_t
*
* Atomically clears the bits set in @mask from @v
*/
static inline void atomic_clear_mask(unsigned long mask, atomic_t *v)
{
unsigned long flags;

mask = ~mask;
raw_local_irq_save(flags); /* Don't trace it in a irqsoff handler */
*addr &= mask;
v->counter &= mask;
raw_local_irq_restore(flags);
}

Expand Down

0 comments on commit a094d1c

Please sign in to comment.