Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1726142
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions |
| Date | 2017-09-04 17:40 +0200 |
| Message-ID | <um1DI-7e8-21@gated-at.bofh.it> (permalink) |
| References | <ukWmK-71s-3@gated-at.bofh.it> <ukWmL-71s-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Sep 01, 2017 at 04:41:01PM +0100, David Howells wrote: > Implement functions that increment or decrement a refcount_t object and > return the value. The dec-and-ret function can be used to maintain a > counter in a cache where 1 means the object is unused, but available and > the garbage collector can use refcount_dec_if_one() to make the object > unavailable. Further, both functions can be used to accurately trace the > refcount (refcount_inc() followed by refcount_read() can't be considered > accurate). Please just use a different interface for that instead of overloading refcount_t. The main use case of that type is that it is so simple that it is hard to get wrong (and have additional checking if things go wrong)
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions David Howells <dhowells@redhat.com> - 2017-09-01 17:50 +0200
Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions Peter Zijlstra <peterz@infradead.org> - 2017-09-01 18:50 +0200
Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions David Howells <dhowells@redhat.com> - 2017-09-01 23:20 +0200
Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions Peter Zijlstra <peterz@infradead.org> - 2017-09-02 00:00 +0200
Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions Peter Zijlstra <peterz@infradead.org> - 2017-09-02 00:10 +0200
Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions David Howells <dhowells@redhat.com> - 2017-09-02 01:00 +0200
Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions Peter Zijlstra <peterz@infradead.org> - 2017-09-04 09:40 +0200
Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions Christoph Hellwig <hch@infradead.org> - 2017-09-04 17:40 +0200
Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions David Howells <dhowells@redhat.com> - 2017-09-04 18:10 +0200
Re: [RFC PATCH 02/11] refcount: Implement inc/decrement-and-return functions Christoph Hellwig <hch@infradead.org> - 2017-09-05 08:50 +0200
csiph-web