On 04/19/2012 01:26 PM, Gleb Natapov wrote: > > > > Unrelated: this pattern is probably common. Would be nice to have a > > __deposit_bit() function. > > > What semantics should it have? Set bit A in bitmap B if value C is > non-zero? > void __deposit_bit(bool bit, unsigned index, unsigned long *word) { if (bit) __set_bit(...) else __clear_bit(...) } I think some processors have an instruction for it (not an s390 reference). -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html