docs: refcount_t documentation

Some functions from refcount_t API provide different
memory ordering guarantees that their atomic counterparts.
This adds a document outlining these differences (
Documentation/core-api/refcount-vs-atomic.rst) as well as
some other minor improvements.

Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
Elena Reshetova
2017-12-05 12:46:35 +02:00
committed by Jonathan Corbet
parent 3ece780510
commit b6e859f6cd
4 changed files with 167 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
#include <linux/kernel.h>
/**
* refcount_t - variant of atomic_t specialized for reference counts
* struct refcount_t - variant of atomic_t specialized for reference counts
* @refs: atomic_t counter field
*
* The counter saturates at UINT_MAX and will not move once