On Tue, 2007-07-24 at 11:13 -0700, Linus Torvalds wrote: > > IOW, if you do a spinlock with the bitops, the locking side should be > able > to use a "test_and_set_bit()" on its own, but the unlocking side > should be > > smp_mb__before_clear_bit(); > clear_bit(); > > because the ones that don't return a value also don't imply a memory > barrier. Yup. But I much prefer Nick's clear_bit_unlock() :-) Ben. - 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 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- From: Trond Myklebust <[email protected]>
- Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- References:
- [PATCH 0/8] i386: bitops: Cleanup, sanitize, optimize
- From: Satyam Sharma <[email protected]>
- [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- From: Satyam Sharma <[email protected]>
- Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- From: Benjamin Herrenschmidt <[email protected]>
- Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- From: Trond Myklebust <[email protected]>
- Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- From: Linus Torvalds <[email protected]>
- [PATCH 0/8] i386: bitops: Cleanup, sanitize, optimize
- Prev by Date: Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- Next by Date: Re: Power Management framework proposal
- Previous by thread: Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- Next by thread: Re: [PATCH 6/8] i386: bitops: Don't mark memory as clobbered unnecessarily
- Index(es):