svn commit: r329961 - stable/11/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Sun Feb 25 10:25:48 UTC 2018
Author: hselasky
Date: Sun Feb 25 10:25:47 2018
New Revision: 329961
URL: https://svnweb.freebsd.org/changeset/base/329961
Log:
MFC r329468:
Add support for kref_read() function in the LinuxKPI.
Submitted by: Johannes Lundberg <johalun0 at gmail.com>
Sponsored by: Mellanox Technologies
Modified:
stable/11/sys/compat/linuxkpi/common/include/linux/kref.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/compat/linuxkpi/common/include/linux/kref.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/kref.h Sun Feb 25 10:24:59 2018 (r329960)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/kref.h Sun Feb 25 10:25:47 2018 (r329961)
@@ -52,6 +52,13 @@ kref_init(struct kref *kref)
refcount_init(&kref->refcount.counter, 1);
}
+static inline unsigned int
+kref_read(const struct kref *kref)
+{
+
+ return (atomic_read(&kref->refcount));
+}
+
static inline void
kref_get(struct kref *kref)
{
More information about the svn-src-stable
mailing list