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 cmpxchg
details: https://anonhg.NetBSD.org/src/rev/504c57bd9910
branches: trunk
changeset: 1028447:504c57bd9910
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:04:28 2021 +0000
description:
cmpxchg
diffstat:
sys/external/bsd/drm2/include/linux/atomic.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 4fa9136064df -r 504c57bd9910 sys/external/bsd/drm2/include/linux/atomic.h
--- a/sys/external/bsd/drm2/include/linux/atomic.h Sun Dec 19 11:04:21 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/atomic.h Sun Dec 19 11:04:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic.h,v 1.34 2021/12/19 11:03:01 riastradh Exp $ */
+/* $NetBSD: atomic.h,v 1.35 2021/12/19 11:04:28 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -43,6 +43,11 @@
: sizeof(*(P)) == 8 ? atomic_swap_64((volatile uint64_t *)P, V) \
: (__builtin_abort(), 0))
+#define cmpxchg(P, O, N) \
+ (sizeof(*(P)) == 4 ? atomic_cas_32((volatile uint32_t *)P, O, N) \
+ : sizeof(*(P)) == 8 ? atomic_cas_64((volatile uint64_t *)P, O, N) \
+ : (__builtin_abort(), 0))
+
/*
* atomic (u)int operations
*
Home |
Main Index |
Thread Index |
Old Index