[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 06 Jun 2011 09:12:12 -0700
From: Arun Sharma <asharma@...com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: Mike Frysinger <vapier.adi@...il.com>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
David Miller <davem@...emloft.net>,
Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH] atomic: generalize atomic_add_unless_return
On 6/5/11 12:35 AM, Eric Dumazet wrote:
>>> + * Returns the old value of @v + @a.
>>> + */
>>> +static inline int atomic_add_unless_return(atomic_t *v, int a, int u)
>> [...]
>>
>> also, the semantics here appear to deviate from the other atomic
>> funcs. the existing xxx_return funcs return the new result, not the
>> old.
>> -mike
>
> Arun comment is wrong, this function does return the new value of the
> atomic_t after our operation, not the old ;)
The comment is technically correct:
old value of @v + @a = new value of @v.
I'll try to make it less confusing :)
Mike: Thanks for the review. I'll fix up the commit log and the func
name and post a new patch.
-Arun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists