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

2024-04-24 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Apr 24 19:05:53 UTC 2024

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

Log Message:
fix pasto in previous


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.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_cpu_detect.c
diff -u xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c:1.3 xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c:1.4
--- xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c:1.3	Wed Apr 24 07:51:17 2024
+++ xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c	Wed Apr 24 19:05:53 2024
@@ -437,7 +437,7 @@ check_os_arm_support(void)
 #if defined(PIPE_ARCH_MIPS64)
 #ifdef __NetBSD__
 static void
-check_os_arm_support(void)
+check_os_mips64_support(void)
 {
 util_cpu_caps.has_msa = false;	/* XXX seems there is no way to detect MSA support from userland */
 }



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

2024-04-24 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Apr 24 19:05:53 UTC 2024

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

Log Message:
fix pasto in previous


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

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



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

2024-04-24 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Apr 24 07:51:17 UTC 2024

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

Log Message:
Add dummy cpu feature detection for mipsn64 on NetBSD.
XXX seems there is no way to detect mips MSA (SIMD) support currently.


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

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



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

2024-04-24 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Wed Apr 24 07:51:17 UTC 2024

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

Log Message:
Add dummy cpu feature detection for mipsn64 on NetBSD.
XXX seems there is no way to detect mips MSA (SIMD) support currently.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.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_cpu_detect.c
diff -u xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c:1.2 xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c:1.3
--- xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c:1.2	Sun Jul 16 22:01:35 2023
+++ xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c	Wed Apr 24 07:51:17 2024
@@ -435,6 +435,13 @@ check_os_arm_support(void)
 #endif /* PIPE_ARCH_ARM || PIPE_ARCH_AARCH64 */
 
 #if defined(PIPE_ARCH_MIPS64)
+#ifdef __NetBSD__
+static void
+check_os_arm_support(void)
+{
+util_cpu_caps.has_msa = false;	/* XXX seems there is no way to detect MSA support from userland */
+}
+#else
 static void
 check_os_mips64_support(void)
 {
@@ -454,6 +461,7 @@ check_os_mips64_support(void)
close (fd);
 }
 }
+#endif
 #endif /* PIPE_ARCH_MIPS64 */
 
 



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

2024-04-23 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Tue Apr 23 16:16:44 UTC 2024

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

Log Message:
Do not re-define CACHE_LINE_SIZE


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 xsrc/external/mit/MesaLib/dist/src/util/macros.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/macros.h
diff -u xsrc/external/mit/MesaLib/dist/src/util/macros.h:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/util/macros.h:1.2
--- xsrc/external/mit/MesaLib/dist/src/util/macros.h:1.1.1.4	Mon May  9 01:23:43 2022
+++ xsrc/external/mit/MesaLib/dist/src/util/macros.h	Tue Apr 23 16:16:44 2024
@@ -478,6 +478,8 @@ typedef int lock_cap_t;
 #endif
 
 /* TODO: this could be different on non-x86 architectures. */
+#ifndef CACHE_LINE_SIZE
 #define CACHE_LINE_SIZE 64
+#endif
 
 #endif /* UTIL_MACROS_H */



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

2024-04-23 Thread Martin Husemann
Module Name:xsrc
Committed By:   martin
Date:   Tue Apr 23 16:16:44 UTC 2024

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

Log Message:
Do not re-define CACHE_LINE_SIZE


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

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



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

2023-07-16 Thread Robert Swindells
Module Name:xsrc
Committed By:   rjs
Date:   Sun Jul 16 22:01:36 UTC 2023

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

Log Message:
sizeof() returns size_t type.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.3 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.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_cpu_detect.c
diff -u xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c:1.1.1.3 xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c:1.1.1.3	Mon May  9 01:23:43 2022
+++ xsrc/external/mit/MesaLib/dist/src/util/u_cpu_detect.c	Sun Jul 16 22:01:35 2023
@@ -623,7 +623,7 @@ util_cpu_detect_once(void)
if (available_cpus == 0) {
   const int mib[] = { CTL_HW, HW_NCPUONLINE };
   int ncpu;
-  int len = sizeof(ncpu);
+  size_t len = sizeof(ncpu);
 
   sysctl(mib, 2, , , NULL, 0);
   available_cpus = ncpu;



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

2023-07-16 Thread Robert Swindells
Module Name:xsrc
Committed By:   rjs
Date:   Sun Jul 16 22:01:36 UTC 2023

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

Log Message:
sizeof() returns size_t type.


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

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



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

2023-07-16 Thread Robert Swindells
Module Name:xsrc
Committed By:   rjs
Date:   Sun Jul 16 21:55:45 UTC 2023

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

Log Message:
include cstdarg for va_list

Copied from graphics/MesaLib pkg.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/util/u_printf.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_printf.h
diff -u xsrc/external/mit/MesaLib/dist/src/util/u_printf.h:1.1.1.1 xsrc/external/mit/MesaLib/dist/src/util/u_printf.h:1.2
--- xsrc/external/mit/MesaLib/dist/src/util/u_printf.h:1.1.1.1	Mon May  9 01:23:43 2022
+++ xsrc/external/mit/MesaLib/dist/src/util/u_printf.h	Sun Jul 16 21:55:45 2023
@@ -25,6 +25,7 @@
 #ifdef __cplusplus
 
 #include 
+#include 
 
 /* find next valid printf specifier in a C++ std::string */
 size_t util_printf_next_spec_pos(const std::string , size_t pos);



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

2023-07-16 Thread Robert Swindells
Module Name:xsrc
Committed By:   rjs
Date:   Sun Jul 16 21:55:45 UTC 2023

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

Log Message:
include cstdarg for va_list

Copied from graphics/MesaLib pkg.


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

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



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

2019-09-24 Thread Maya Rashish
Module Name:xsrc
Committed By:   maya
Date:   Tue Sep 24 19:47:33 UTC 2019

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

Log Message:
Apply u_queue.c patch from pkgsrc:

atexit is not a good idea in shared libraries.
attempt to port cpuset logic to netbsd


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/MesaLib/dist/src/util/u_queue.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_queue.c
diff -u xsrc/external/mit/MesaLib/dist/src/util/u_queue.c:1.3 xsrc/external/mit/MesaLib/dist/src/util/u_queue.c:1.4
--- xsrc/external/mit/MesaLib/dist/src/util/u_queue.c:1.3	Tue Sep 24 19:26:51 2019
+++ xsrc/external/mit/MesaLib/dist/src/util/u_queue.c	Tue Sep 24 19:47:33 2019
@@ -48,15 +48,22 @@ static once_flag atexit_once_flag = ONCE
 static struct list_head queue_list;
 static mtx_t exit_mutex = _MTX_INITIALIZER_NP;
 
+#define HAVE_NOATEXIT
+#if defined(HAVE_NOATEXIT)
 static int global_init_called = 0;
 
 static void __attribute__((__destructor__))
+#else
+static void
+#endif
 atexit_handler(void)
 {
struct util_queue *iter;
 
+#if defined(HAVE_NOATEXIT)
if (!global_init_called)
   return;
+#endif
 
mtx_lock(_mutex);
/* Wait for all queues to assert idle. */
@@ -70,7 +77,11 @@ static void
 global_init(void)
 {
LIST_INITHEAD(_list);
+#if defined(HAVE_NOATEXIT)
global_init_called = 1;
+#else
+   atexit(atexit_handler);
+#endif
 }
 
 static void
@@ -251,12 +262,25 @@ util_queue_thread_func(void *input)
   /* Don't inherit the thread affinity from the parent thread.
* Set the full mask.
*/
+#if defined(__NetBSD__)
+  cpuset_t *cpuset;
+  cpuset = cpuset_create();
+  if (cpuset != NULL) {
+ cpuset_zero(cpuset);
+ for (unsigned i = 0; i < cpuset_size(cpuset); i++)
+cpuset_set(i, cpuset);
+
+ pthread_setaffinity_np(pthread_self(), cpuset_size(cpuset), cpuset);
+ cpuset_destroy(cpuset);
+  }
+#else
   cpu_set_t cpuset;
   CPU_ZERO();
   for (unsigned i = 0; i < CPU_SETSIZE; i++)
  CPU_SET(i, );
 
   pthread_setaffinity_np(pthread_self(), sizeof(cpuset), );
+#endif
}
 #endif
 



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

2019-09-24 Thread Maya Rashish
Module Name:xsrc
Committed By:   maya
Date:   Tue Sep 24 19:47:33 UTC 2019

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

Log Message:
Apply u_queue.c patch from pkgsrc:

atexit is not a good idea in shared libraries.
attempt to port cpuset logic to netbsd


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

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



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

2019-05-11 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Sat May 11 18:50:15 UTC 2019

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

Log Message:
try again to get it working for clang


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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.



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

2019-05-11 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Sat May 11 18:50:15 UTC 2019

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

Log Message:
try again to get it working for clang


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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.4 xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c:1.5
--- xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c:1.4	Thu May  2 16:56:21 2019
+++ xsrc/external/mit/MesaLib/dist/src/util/u_atomic.c	Sat May 11 14:50:15 2019
@@ -62,12 +62,9 @@ __atomic_fetch_sub_8(volatile long long 
return r;
 }
 
+#ifndef __clang__
 WEAK long long
-__sync_val_compare_and_swap_8(volatile long long *ptr, long long oldval, long long newval
-#ifdef __clang__
-	, ...
-#endif
-)
+__sync_val_compare_and_swap_8(volatile long long *ptr, long long oldval, long long newval)
 {
long long r;
 
@@ -79,5 +76,6 @@ __sync_val_compare_and_swap_8(volatile l
 
return r;
 }
+#endif
 
 #endif



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-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.



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(_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(_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(_mutex);
r = *ptr;



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.



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

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.



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.



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;
 }