lkml.org 
[lkml]   [2016]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 7/7] kref: Implement using refcount_t

* Peter Zijlstra <peterz@infradead.org> wrote:

> Provide refcount_t, an atomic_t like primitive built just for
> refcounting.
>
> It provides overflow and underflow checks as well as saturation
> semantics such that when it overflows, we'll never attempt to free it
> again, ever.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> include/linux/kref.h | 29 ++----
> include/linux/refcount.h | 221 +++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 232 insertions(+), 18 deletions(-)

I'd suggest splitting this patch into two parts: first patch introduces the
refcount.h facility, second patch changes over struct kref to the new facility.

Thanks,

Ingo

\
 
 \ /
  Last update: 2016-11-15 09:41    [W:0.363 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site