Re: [PATCH RFC 1/5] KVM: introduce a set_bit function for bitmaps in user space

Avi Kivity
2010-04-12T09:12:56Z

On 04/12/2010 04:29 AM, Takuya Yoshikawa wrote:
>> Should be called __set_bit_user() since it is non-atomic.
>
>
> Actually I first named it like that and then noticed that in the uaccess'
> convention, __ prefix means it is "with less checking" version.

On the other hand, for the bitops family, __ means nonatomic.

>
> I don't know which is better in this case, should be
> "set_bit_user_non_atomic"
> though bit long? May be judged by x86 people.

And there's _inatomic which means no sleeping... it's good to have a
long name since it avoids confusion, especially in a newly introduced
function. So I like your last suggestion.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.