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/linux Fix argument types of atomic64_a...



details:   https://anonhg.NetBSD.org/src/rev/80a660ba9875
branches:  trunk
changeset: 993083:80a660ba9875
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 15:10:52 2018 +0000

description:
Fix argument types of atomic64_add/sub to be sensible.

Technically Linux does use long long rather than int64_t, but that's
silly.

diffstat:

 sys/external/bsd/drm2/include/linux/atomic.h |  10 +++++-----
 sys/external/bsd/drm2/linux/linux_atomic64.c |   8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (73 lines):

diff -r c601fee3bb0d -r 80a660ba9875 sys/external/bsd/drm2/include/linux/atomic.h
--- a/sys/external/bsd/drm2/include/linux/atomic.h      Mon Aug 27 15:10:41 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/atomic.h      Mon Aug 27 15:10:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic.h,v 1.16 2018/08/27 15:10:41 riastradh Exp $    */
+/*     $NetBSD: atomic.h,v 1.17 2018/08/27 15:10:52 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -251,14 +251,14 @@
 }
 
 static inline void
-atomic64_add(long long d, struct atomic64 *a)
+atomic64_add(int64_t d, struct atomic64 *a)
 {
        /* no membar */
        atomic_add_64(&a->a_v, d);
 }
 
 static inline void
-atomic64_sub(long long d, struct atomic64 *a)
+atomic64_sub(int64_t d, struct atomic64 *a)
 {
        /* no membar */
        atomic_add_64(&a->a_v, -d);
@@ -304,8 +304,8 @@
 
 uint64_t       atomic64_read(const struct atomic64 *);
 void           atomic64_set(struct atomic64 *, uint64_t);
-void           atomic64_add(long long, struct atomic64 *);
-void           atomic64_sub(long long, struct atomic64 *);
+void           atomic64_add(int64_t, struct atomic64 *);
+void           atomic64_sub(int64_t, struct atomic64 *);
 uint64_t       atomic64_xchg(struct atomic64 *, uint64_t);
 uint64_t       atomic64_cmpxchg(struct atomic64 *, uint64_t, uint64_t);
 
diff -r c601fee3bb0d -r 80a660ba9875 sys/external/bsd/drm2/linux/linux_atomic64.c
--- a/sys/external/bsd/drm2/linux/linux_atomic64.c      Mon Aug 27 15:10:41 2018 +0000
+++ b/sys/external/bsd/drm2/linux/linux_atomic64.c      Mon Aug 27 15:10:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_atomic64.c,v 1.1 2018/08/27 15:08:54 riastradh Exp $     */
+/*     $NetBSD: linux_atomic64.c,v 1.2 2018/08/27 15:10:53 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_atomic64.c,v 1.1 2018/08/27 15:08:54 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_atomic64.c,v 1.2 2018/08/27 15:10:53 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/bitops.h>
@@ -147,7 +147,7 @@
 }
 
 void
-atomic64_add(long long delta, struct atomic64 *a)
+atomic64_add(int64_t delta, struct atomic64 *a)
 {
 
        atomic64_lock(a);
@@ -156,7 +156,7 @@
 }
 
 void
-atomic64_sub(long long delta, struct atomic64 *a)
+atomic64_sub(int64_t delta, struct atomic64 *a)
 {
 
        atomic64_lock(a);



Home | Main Index | Thread Index | Old Index