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 Add some reservation stubs.
details: https://anonhg.NetBSD.org/src/rev/76d97a615370
branches: trunk
changeset: 365999:76d97a615370
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 07:32:11 2018 +0000
description:
Add some reservation stubs.
diffstat:
sys/external/bsd/drm2/include/linux/reservation.h | 27 ++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diffs (54 lines):
diff -r 0f2136f74b56 -r 76d97a615370 sys/external/bsd/drm2/include/linux/reservation.h
--- a/sys/external/bsd/drm2/include/linux/reservation.h Mon Aug 27 07:32:00 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/reservation.h Mon Aug 27 07:32:11 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: reservation.h,v 1.1 2014/07/16 20:59:58 riastradh Exp $ */
+/* $NetBSD: reservation.h,v 1.2 2018/08/27 07:32:11 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -32,14 +32,28 @@
#ifndef _ASM_RESERVATION_H_
#define _ASM_RESERVATION_H_
+#include <sys/atomic.h>
+
#include <linux/ww_mutex.h>
+struct fence;
+
extern struct ww_class reservation_ww_class;
struct reservation_object {
struct ww_mutex lock;
+
+ struct fence *robj_fence_excl;
};
+#define reservation_object_add_excl_fence linux_reservation_object_add_excl_fence
+#define reservation_object_add_shared_fence linux_reservation_object_add_shared_fence
+
+void reservation_object_add_excl_fence(struct reservation_object *,
+ struct fence *);
+void reservation_object_add_shared_fence(struct reservation_object *,
+ struct fence *);
+
static inline void
reservation_object_init(struct reservation_object *reservation)
{
@@ -54,4 +68,15 @@
ww_mutex_destroy(&reservation->lock);
}
+static inline struct fence *
+reservation_object_get_excl(struct reservation_object *reservation)
+{
+ struct fence *fence;
+
+ fence = reservation->robj_fence_excl;
+ membar_datadep_consumer();
+
+ return fence;
+}
+
#endif /* _ASM_RESERVATION_H_ */
Home |
Main Index |
Thread Index |
Old Index