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 Add atomic_add ...
details: https://anonhg.NetBSD.org/src/rev/ef760c304c68
branches: riastradh-drm2
changeset: 788151:ef760c304c68
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 02:27:52 2013 +0000
description:
Add atomic_add and atomic_add_return to <linux/atomic.h>.
diffstat:
sys/external/bsd/drm2/include/linux/atomic.h | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r a069d78e85f9 -r ef760c304c68 sys/external/bsd/drm2/include/linux/atomic.h
--- a/sys/external/bsd/drm2/include/linux/atomic.h Wed Jul 24 02:27:38 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/atomic.h Wed Jul 24 02:27:52 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic.h,v 1.1.2.6 2013/07/24 02:27:38 riastradh Exp $ */
+/* $NetBSD: atomic.h,v 1.1.2.7 2013/07/24 02:27:52 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -56,6 +56,18 @@
}
static inline void
+atomic_add(int addend, atomic_t *atomic)
+{
+ atomic_add_int(&atomic->a_u.au_uint, addend);
+}
+
+static inline int
+atomic_add_return(int addend, atomic_t *atomic)
+{
+ return (int)atomic_add_int_nv(&atomic->a_u.au_uint, addend);
+}
+
+static inline void
atomic_inc(atomic_t *atomic)
{
atomic_inc_uint(&atomic->a_u.au_uint);
Home |
Main Index |
Thread Index |
Old Index