Russell King <[email protected]> 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; raw_local_irq_save(flags); *p |= mask; raw_local_irq_restore(flags); } And the other in the libs which does as you say. Why the one in the header file at all? David - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- From: David Howells <[email protected]>
- Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- From: Russell King <[email protected]>
- Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- References:
- Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- From: Russell King <[email protected]>
- Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- From: Andrew Morton <[email protected]>
- [PATCH 1/3] WorkStruct: Fix up some PA-RISC work items
- From: David Howells <[email protected]>
- [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- From: David Howells <[email protected]>
- Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- From: David Howells <[email protected]>
- Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- Prev by Date: Re: [PATCH] sound : Replace kmalloc()+memset(0) with kzalloc().
- Next by Date: Re: [PATCH 2.6.19] drivers/media/video/cpia2/cpia2_usb.c: Free previously allocated memory (in array elements) if kmalloc() returns NULL.
- Previous by thread: Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- Next by thread: Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than cmpxchg()
- Index(es):