lkml.org 
[lkml]   [2023]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] refcount: introduce __refcount_dec_and_lock macro
On Mon, Nov 06, 2023 at 02:11:37PM -0500, Alexander Aring wrote:
> This patch adds the __refcount_dec_and_lock macro to generate code for a
> lock specific refcount_dec_and_lock implementation. Existing
> refcount_dec_and_lock implementation are updated to use the new
> __refcount_dec_and_lock macro. In future other lock implementation can
> added to use the refcount_dec_and_lock trick to only hold the lock when
> the refcount is going to be zero. Per subsystem own lock implementation
> can use the macro as well to provide such implementation for their own
> locking type.
>
> Co-developed: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Alexander Aring <aahringo@redhat.com>

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

\
 
 \ /
  Last update: 2023-11-20 13:53    [W:1.451 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site