lkml.org 
[lkml]   [2017]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] buffer: Avoid setting buffer bits that are already set
From
Date


On 2017年10月24日 09:21, Andi Kleen wrote:
> kemi <kemi.wang@intel.com> writes:
>>
>> I'll see if I can find some
>>> time to implement the above in a nice way.
>>
>> Agree. Maybe something like test_and_set_bit() would be more suitable.
>
> test_and_set_bit is a very different operation for the CPU because
> it is atomic for both. But we want the initial read to not
> be atomic.
>

I meant to express the meaning of test before setting bit.
Apologize to make you confused.

> If you add special functions use a different variant that is only
> atomic for the set.
>
> -Andi
>

\
 
 \ /
  Last update: 2017-10-24 03:28    [W:0.051 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site