CVS commit: xsrc/external/mit/MesaLib/dist/src/util

2019-05-02 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Thu May  2 20:56:21 UTC 2019

Modified Files:
xsrc/external/mit/MesaLib/dist/src/util: u_atomic.c

Log Message:
fix for clang.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c
diff -u xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c:1.3 xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c:1.4
--- xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c:1.3	Mon Apr 15 16:32:43 2019
+++ xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c	Thu May  2 16:56:21 2019
@@ -63,7 +63,11 @@ __atomic_fetch_sub_8(volatile long long 
 }
 
 WEAK long long
-__sync_val_compare_and_swap_8(volatile long long *ptr, long long oldval, long long newval)
+__sync_val_compare_and_swap_8(volatile long long *ptr, long long oldval, long long newval
+#ifdef __clang__
+	, ...
+#endif
+)
 {
long long r;
 



CVS commit: xsrc/external/mit/MesaLib/dist/src/util

2019-04-15 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Mon Apr 15 20:32:44 UTC 2019

Modified Files:
xsrc/external/mit/MesaLib/dist/src/util: u_atomic.c

Log Message:
use long long and volatile consistently.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c
diff -u xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c:1.2 xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c:1.3
--- xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c:1.2	Sat Mar  9 23:15:57 2019
+++ xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c	Mon Apr 15 16:32:43 2019
@@ -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 @@ __atomic_fetch_add_8(long long *ptr, lon
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 @@ __atomic_fetch_sub_8(long long *ptr, lon
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;



CVS commit: xsrc/external/mit/MesaLib/dist/src/util

2019-04-06 Thread Maya Rashish
Module Name:xsrc
Committed By:   maya
Date:   Sat Apr  6 10:00:13 UTC 2019

Modified Files:
xsrc/external/mit/MesaLib/dist/src/util: u_math.h

Log Message:
Use a name for the largest representable float

Actually intended to appease vax which has a floating point format
that doesn't match the same range as IEEE754 float.

(why not exp2f?)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 xsrc/external/mit/MesaLib/dist/src/util/u_math.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/MesaLib/dist/src/util/u_math.h
diff -u xsrc/external/mit/MesaLib/dist/src/util/u_math.h:1.1.1.1 xsrc/external/mit/MesaLib/dist/src/util/u_math.h:1.2
--- xsrc/external/mit/MesaLib/dist/src/util/u_math.h:1.1.1.1	Sun Mar 10 03:42:34 2019
+++ xsrc/external/mit/MesaLib/dist/src/util/u_math.h	Sat Apr  6 10:00:13 2019
@@ -117,7 +117,7 @@ util_fast_exp2(float x)
union fi epart;
 
if(x > 129.0f)
-  return 3.402823466e+38f;
+  return FLT_MAX;
 
if (x < -126.9f)
   return 0.0f;



CVS commit: xsrc/external/mit/MesaLib/dist/src/util

2015-08-15 Thread Michael van Elst
Module Name:xsrc
Committed By:   mlelstv
Date:   Sat Aug 15 13:20:54 UTC 2015

Modified Files:
xsrc/external/mit/MesaLib/dist/src/util: ralloc.c

Log Message:
Use __attribute__((__destructor__)), not atexit, in shared objects.

Recovered from our local changes to MesaLib7.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 xsrc/external/mit/MesaLib/dist/src/util/ralloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/MesaLib/dist/src/util/ralloc.c
diff -u xsrc/external/mit/MesaLib/dist/src/util/ralloc.c:1.1.1.1 xsrc/external/mit/MesaLib/dist/src/util/ralloc.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/util/ralloc.c:1.1.1.1	Thu Dec 18 06:02:09 2014
+++ xsrc/external/mit/MesaLib/dist/src/util/ralloc.c	Sat Aug 15 13:20:54 2015
@@ -285,7 +285,7 @@ ralloc_parent(const void *ptr)
 
 static void *autofree_context = NULL;
 
-static void
+static void __attribute__((__destructor__))
 autofree(void)
 {
ralloc_free(autofree_context);
@@ -296,7 +296,6 @@ ralloc_autofree_context(void)
 {
if (unlikely(autofree_context == NULL)) {
   autofree_context = ralloc_context(NULL);
-  atexit(autofree);
}
return autofree_context;
 }