[lkml]   [2006]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
Russell King <> wrote:

> Incorrect. pre-v6 ARM bitops for test_and_xxx_bit() all do:
> save and disable irqs
> load value
> test bit
> if not in desired state, alter bit and write it back
> restore irqs

Hmmm... ARM has two implementations. One in the header files which is what I
consulted when writing that email:

static inline void ____atomic_set_bit(unsigned int bit, volatile unsigned long *p)
unsigned long flags;
unsigned long mask = 1UL << (bit & 31);

p += bit >> 5;

*p |= mask;

And the other in the libs which does as you say. Why the one in the header
file at all?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-12-08 01:01    [W:0.066 / U:20.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site