Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/trunk]: xsrc/external/mit/MesaLib/dist/src/util use long long and volat...
details: https://anonhg.NetBSD.org/xsrc/rev/2a52f890122a
branches: trunk
changeset: 10266:2a52f890122a
user: christos <christos%NetBSD.org@localhost>
date: Mon Apr 15 20:32:43 2019 +0000
description:
use long long and volatile consistently.
diffstat:
external/mit/MesaLib/dist/src/util/u_atomic.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (45 lines):
diff -r 5ae0c3222236 -r 2a52f890122a external/mit/MesaLib/dist/src/util/u_atomic.c
--- a/external/mit/MesaLib/dist/src/util/u_atomic.c Tue Apr 09 14:14:59 2019 +0000
+++ b/external/mit/MesaLib/dist/src/util/u_atomic.c Mon Apr 15 20:32:43 2019 +0000
@@ -36,10 +36,10 @@
static pthread_mutex_t sync_mutex = PTHREAD_MUTEX_INITIALIZER;
-WEAK uint64_t
-__atomic_fetch_add_8(long long *ptr, long long val, int memorder)
+WEAK long long
+__atomic_fetch_add_8(volatile long long *ptr, long long val, int memorder)
{
- uint64_t r;
+ long long r;
pthread_mutex_lock(&sync_mutex);
*ptr += val;
@@ -49,10 +49,10 @@
return r;
}
-WEAK uint64_t
-__atomic_fetch_sub_8(long long *ptr, long long val, int memorder)
+WEAK long long
+__atomic_fetch_sub_8(volatile long long *ptr, long long val, int memorder)
{
- uint64_t r;
+ long long r;
pthread_mutex_lock(&sync_mutex);
*ptr -= val;
@@ -62,10 +62,10 @@
return r;
}
-WEAK uint64_t
-__sync_val_compare_and_swap_8(uint64_t *ptr, uint64_t oldval, uint64_t newval)
+WEAK long long
+__sync_val_compare_and_swap_8(volatile long long *ptr, long long oldval, long long newval)
{
- uint64_t r;
+ long long r;
pthread_mutex_lock(&sync_mutex);
r = *ptr;
Home |
Main Index |
Thread Index |
Old Index