On Sun, 14 Feb 2016, Konstantin Khlebnikov wrote:
> Yep, they are just abstraction around cmpxchg, as well as a half of atomic
> operations. Probably some architectures could implement this differently.
Ok then use this_cpu_cmpxchg and cmpxchg to implement it instead?
On Sun, 14 Feb 2016, Konstantin Khlebnikov wrote:
> Yep, they are just abstraction around cmpxchg, as well as a half of atomic
> operations. Probably some architectures could implement this differently.
Ok then use this_cpu_cmpxchg and cmpxchg to implement it instead?
On Mon, Feb 15, 2016 at 10:50:29AM +, Will Deacon wrote:
> Adding Peter and Paul,
>
> On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
> > bool atomic_add_max(atomic_t *var, int add, int max);
> > bool atomic_sub_min(atomic_t *var, int sub, int min);
>
> What are the
On Mon, Feb 15, 2016 at 10:50:29AM +, Will Deacon wrote:
> Adding Peter and Paul,
>
> On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
> > bool atomic_add_max(atomic_t *var, int add, int max);
> > bool atomic_sub_min(atomic_t *var, int sub, int min);
>
> What are the
On Mon, Feb 15, 2016 at 1:50 PM, Will Deacon wrote:
> Adding Peter and Paul,
>
> On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
>> bool atomic_add_max(atomic_t *var, int add, int max);
>> bool atomic_sub_min(atomic_t *var, int sub, int min);
>
> What
On Mon, Feb 15, 2016 at 1:50 PM, Will Deacon wrote:
> Adding Peter and Paul,
>
> On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
>> bool atomic_add_max(atomic_t *var, int add, int max);
>> bool atomic_sub_min(atomic_t *var, int sub, int min);
>
> What are the
Adding Peter and Paul,
On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
> bool atomic_add_max(atomic_t *var, int add, int max);
> bool atomic_sub_min(atomic_t *var, int sub, int min);
What are the memory-ordering requirements for these? Do you also want
Adding Peter and Paul,
On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
> bool atomic_add_max(atomic_t *var, int add, int max);
> bool atomic_sub_min(atomic_t *var, int sub, int min);
What are the memory-ordering requirements for these? Do you also want
On Sun, Feb 14, 2016 at 7:51 PM, Tejun Heo wrote:
> Hello, Konstantin.
>
> On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
>> bool atomic_add_max(atomic_t *var, int add, int max);
>> bool atomic_sub_min(atomic_t *var, int sub, int min);
>>
>> bool this_cpu_add_max(var, add,
Hello, Konstantin.
On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
> bool atomic_add_max(atomic_t *var, int add, int max);
> bool atomic_sub_min(atomic_t *var, int sub, int min);
>
> bool this_cpu_add_max(var, add, max);
> bool this_cpu_sub_min(var, sub, min);
>
> They
bool atomic_add_max(atomic_t *var, int add, int max);
bool atomic_sub_min(atomic_t *var, int sub, int min);
bool this_cpu_add_max(var, add, max);
bool this_cpu_sub_min(var, sub, min);
They add/subtract only if result will be not bigger than max/lower that min.
Returns true if operation was done
Hello, Konstantin.
On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
> bool atomic_add_max(atomic_t *var, int add, int max);
> bool atomic_sub_min(atomic_t *var, int sub, int min);
>
> bool this_cpu_add_max(var, add, max);
> bool this_cpu_sub_min(var, sub, min);
>
> They
On Sun, Feb 14, 2016 at 7:51 PM, Tejun Heo wrote:
> Hello, Konstantin.
>
> On Sun, Feb 14, 2016 at 12:09:00PM +0300, Konstantin Khlebnikov wrote:
>> bool atomic_add_max(atomic_t *var, int add, int max);
>> bool atomic_sub_min(atomic_t *var, int sub, int min);
>>
>> bool
bool atomic_add_max(atomic_t *var, int add, int max);
bool atomic_sub_min(atomic_t *var, int sub, int min);
bool this_cpu_add_max(var, add, max);
bool this_cpu_sub_min(var, sub, min);
They add/subtract only if result will be not bigger than max/lower that min.
Returns true if operation was done
14 matches
Mail list logo