Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/linux Implement kref_read.



details:   https://anonhg.NetBSD.org/src/rev/5b3d21e062d4
branches:  trunk
changeset: 1027800:5b3d21e062d4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 00:46:50 2021 +0000

description:
Implement kref_read.

diffstat:

 sys/external/bsd/drm2/include/linux/kref.h |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 6728a113c465 -r 5b3d21e062d4 sys/external/bsd/drm2/include/linux/kref.h
--- a/sys/external/bsd/drm2/include/linux/kref.h        Sun Dec 19 00:46:44 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/kref.h        Sun Dec 19 00:46:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kref.h,v 1.7 2018/08/27 13:44:41 riastradh Exp $       */
+/*     $NetBSD: kref.h,v 1.8 2021/12/19 00:46:50 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -140,6 +140,17 @@
        return 0;
 }
 
+static inline unsigned
+kref_read(const struct kref *kref)
+{
+       unsigned v;
+
+       v = kref->kr_count;
+       __insn_barrier();
+
+       return v;
+}
+
 /*
  * Not native to Linux.  Mostly used for assertions...
  */



Home | Main Index | Thread Index | Old Index