Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88882
b: refs/heads/master
c: f7d909d
h: refs/heads/master
v: v3
  • Loading branch information
Jan Beulich authored and Ingo Molnar committed Apr 17, 2008
1 parent fbc57ba commit dee10ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 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: acb5b8a2dd0f901463d075382ea548935e679f4e
refs/heads/master: f7d909d5475bb27d261389a3902860e086b0d4c9
21 changes: 1 addition & 20 deletions trunk/include/asm-x86/sync_bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,7 @@ static inline int sync_test_and_change_bit(int nr, volatile unsigned long* addr)
return oldbit;
}

static __always_inline int sync_constant_test_bit(int nr, const volatile unsigned long *addr)
{
return ((1UL << (nr & 31)) &
(((const volatile unsigned int *)addr)[nr >> 5])) != 0;
}

static inline int sync_var_test_bit(int nr, const volatile unsigned long * addr)
{
int oldbit;

__asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0"
:"=r" (oldbit)
:"m" (ADDR),"Ir" (nr));
return oldbit;
}

#define sync_test_bit(nr,addr) \
(__builtin_constant_p(nr) ? \
sync_constant_test_bit((nr),(addr)) : \
sync_var_test_bit((nr),(addr)))
#define sync_test_bit test_bit

#undef ADDR

Expand Down

0 comments on commit dee10ed

Please sign in to comment.