Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Implement atomi...
details: https://anonhg.NetBSD.org/src/rev/7d3bc7b650b0
branches: riastradh-drm2
changeset: 787995:7d3bc7b650b0
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 00:48:34 2013 +0000
description:
Implement atomic_t and atomic_read in drm2's <linux/atomic.h> shim.
diffstat:
sys/external/bsd/drm2/include/linux/atomic.h | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 2feda408db65 -r 7d3bc7b650b0 sys/external/bsd/drm2/include/linux/atomic.h
--- a/sys/external/bsd/drm2/include/linux/atomic.h Wed Jul 24 00:48:20 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/atomic.h Wed Jul 24 00:48:34 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic.h,v 1.1.2.1 2013/07/24 00:33:12 riastradh Exp $ */
+/* $NetBSD: atomic.h,v 1.1.2.2 2013/07/24 00:48:34 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,4 +32,14 @@
#ifndef _LINUX_ATOMIC_H_
#define _LINUX_ATOMIC_H_
+typedef struct {
+ int atomic_value;
+} atomic_t;
+
+static inline int
+atomic_read(atomic_t *atomic)
+{
+ return *(volatile int *)&atomic->atomic_value;
+}
+
#endif /* _LINUX_ATOMIC_H_ */
Home |
Main Index |
Thread Index |
Old Index