summaryrefslogtreecommitdiff
path: root/graphics/mesa/patches/patch-src_util_u_atomic_c
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mesa/patches/patch-src_util_u_atomic_c')
-rw-r--r--graphics/mesa/patches/patch-src_util_u_atomic_c58
1 files changed, 0 insertions, 58 deletions
diff --git a/graphics/mesa/patches/patch-src_util_u_atomic_c b/graphics/mesa/patches/patch-src_util_u_atomic_c
deleted file mode 100644
index 8c1bb55..0000000
--- a/graphics/mesa/patches/patch-src_util_u_atomic_c
+++ /dev/null
@@ -1,58 +0,0 @@
-Index: src/util/u_atomic.c
---- src/util/u_atomic.c.orig
-+++ src/util/u_atomic.c
-@@ -32,6 +32,21 @@
- #define WEAK
- #endif
-
-+#ifdef __clang__
-+#pragma clang diagnostic ignored "-Wmissing-prototypes"
-+#pragma redefine_extname __sync_add_and_fetch_8_c __sync_add_and_fetch_8
-+#pragma redefine_extname __sync_sub_and_fetch_8_c __sync_sub_and_fetch_8
-+#pragma redefine_extname __sync_fetch_and_add_8_c __sync_fetch_and_add_8
-+#pragma redefine_extname __sync_fetch_and_sub_8_c __sync_fetch_and_sub_8
-+#pragma redefine_extname __sync_val_compare_and_swap_8_c \
-+ __sync_val_compare_and_swap_8
-+#define __sync_add_and_fetch_8 __sync_add_and_fetch_8_c
-+#define __sync_sub_and_fetch_8 __sync_sub_and_fetch_8_c
-+#define __sync_fetch_and_add_8 __sync_fetch_and_add_8_c
-+#define __sync_fetch_and_sub_8 __sync_fetch_and_sub_8_c
-+#define __sync_val_compare_and_swap_8 __sync_val_compare_and_swap_8_c
-+#endif
-+
- static pthread_mutex_t sync_mutex = PTHREAD_MUTEX_INITIALIZER;
-
- #ifdef __clang__
-@@ -70,6 +85,32 @@ __sync_sub_and_fetch_8(uint64_t *ptr, uint64_t val)
- pthread_mutex_lock(&sync_mutex);
- *ptr -= val;
- r = *ptr;
-+ pthread_mutex_unlock(&sync_mutex);
-+
-+ return r;
-+}
-+
-+WEAK uint64_t
-+__sync_fetch_and_add_8(uint64_t *ptr, uint64_t val)
-+{
-+ uint64_t r;
-+
-+ pthread_mutex_lock(&sync_mutex);
-+ r = *ptr;
-+ *ptr += val;
-+ pthread_mutex_unlock(&sync_mutex);
-+
-+ return r;
-+}
-+
-+WEAK uint64_t
-+__sync_fetch_and_sub_8(uint64_t *ptr, uint64_t val)
-+{
-+ uint64_t r;
-+
-+ pthread_mutex_lock(&sync_mutex);
-+ r = *ptr;
-+ *ptr -= val;
- pthread_mutex_unlock(&sync_mutex);
-
- return r;