[lkml]   [2017]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions
Peter Zijlstra <> wrote:

> > unsigned int refcount_dec_return(refcount_t *r);
> > unsigned int refcount_inc_return(refcount_t *r);
> >
> I'm not immediately seeing how wanting 1 to mean unused leads to
> requiring these two functions.

Did you read the other other part of the description?

Further, both functions can be used to accurately trace the refcount
(refcount_inc() followed by refcount_read() can't be considered

> If you'll remember, I did that for inode_count and only needed
> dec_unless().

I don't remember. inode_count? I can't find such a thing - did you mean
i_count? I don't find anything matching "dec_unless.*i_count" either.


 \ /
  Last update: 2017-09-01 23:16    [W:0.088 / U:0.308 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site