mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
f9d6966b7f
More trimming of sched.h dependencies. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
19 lines
512 B
C
19 lines
512 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_REFCOUNT_TYPES_H
|
|
#define _LINUX_REFCOUNT_TYPES_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/**
|
|
* typedef refcount_t - variant of atomic_t specialized for reference counts
|
|
* @refs: atomic_t counter field
|
|
*
|
|
* The counter saturates at REFCOUNT_SATURATED and will not move once
|
|
* there. This avoids wrapping the counter and causing 'spurious'
|
|
* use-after-free bugs.
|
|
*/
|
|
typedef struct refcount_struct {
|
|
atomic_t refs;
|
|
} refcount_t;
|
|
|
|
#endif /* _LINUX_REFCOUNT_TYPES_H */
|