summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/MesaLib/distinfo4
-rw-r--r--graphics/MesaLib/patches/patch-src_util_u__thread.h22
2 files changed, 18 insertions, 8 deletions
diff --git a/graphics/MesaLib/distinfo b/graphics/MesaLib/distinfo
index 74d915279ae..05c0dbba419 100644
--- a/graphics/MesaLib/distinfo
+++ b/graphics/MesaLib/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.134 2019/10/18 09:57:07 nia Exp $
+$NetBSD: distinfo,v 1.135 2019/10/19 10:29:57 nia Exp $
SHA1 (mesa-19.2.1.tar.xz) = 8ba7cb66799d5372923651f193f84d498b35c9a5
RMD160 (mesa-19.2.1.tar.xz) = a3f068b71b138aae24cefd5c3cb044a5975b9aa2
@@ -42,4 +42,4 @@ SHA1 (patch-src_util_ralloc.c) = d311bfd9ed7e673d72e050668d351c1e6552cdc8
SHA1 (patch-src_util_strndup.h) = 73f49694ca48ad6b9a9d8346c5b84fddec2463bd
SHA1 (patch-src_util_u__atomic.h) = 31d4514538ef5ee53012695eb5c66134aaec981e
SHA1 (patch-src_util_u__queue.c) = ed1ea3f6fc37e9a64894a3e865c48691b6e01b2c
-SHA1 (patch-src_util_u__thread.h) = f0453485bb62d0b7c00a1b840cfce2726ebcbfd2
+SHA1 (patch-src_util_u__thread.h) = a49a0839881c30aeede118d096250820d10d8317
diff --git a/graphics/MesaLib/patches/patch-src_util_u__thread.h b/graphics/MesaLib/patches/patch-src_util_u__thread.h
index d53cde5bc81..213489e6bcd 100644
--- a/graphics/MesaLib/patches/patch-src_util_u__thread.h
+++ b/graphics/MesaLib/patches/patch-src_util_u__thread.h
@@ -1,10 +1,20 @@
-$NetBSD: patch-src_util_u__thread.h,v 1.1 2019/08/21 13:35:28 nia Exp $
+$NetBSD: patch-src_util_u__thread.h,v 1.2 2019/10/19 10:29:58 nia Exp $
+
+Don't hard error when there's no pthread_setname_np.
handle NetBSD-style pthread_setaffinity_np(3)
---- src/util/u_thread.h.orig 2018-12-11 21:13:57.000000000 +0000
+--- src/util/u_thread.h.orig 2019-10-09 16:52:00.000000000 +0000
+++ src/util/u_thread.h
-@@ -83,6 +83,17 @@ static inline void
+@@ -78,7 +78,6 @@ static inline void u_thread_setname( con
+ #elif DETECT_OS_APPLE
+ pthread_setname_np(name);
+ #else
+-#error Not sure how to call pthread_setname_np
+ #endif
+ #endif
+ (void)name;
+@@ -98,6 +97,17 @@ static inline void
util_pin_thread_to_L3(thrd_t thread, unsigned L3_index, unsigned cores_per_L3)
{
#if defined(HAVE_PTHREAD_SETAFFINITY)
@@ -22,7 +32,7 @@ handle NetBSD-style pthread_setaffinity_np(3)
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
-@@ -90,6 +101,7 @@ util_pin_thread_to_L3(thrd_t thread, uns
+@@ -105,6 +115,7 @@ util_pin_thread_to_L3(thrd_t thread, uns
CPU_SET(L3_index * cores_per_L3 + i, &cpuset);
pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);
#endif
@@ -30,7 +40,7 @@ handle NetBSD-style pthread_setaffinity_np(3)
}
/**
-@@ -103,6 +115,35 @@ static inline int
+@@ -118,6 +129,35 @@ static inline int
util_get_L3_for_pinned_thread(thrd_t thread, unsigned cores_per_L3)
{
#if defined(HAVE_PTHREAD_SETAFFINITY)
@@ -66,7 +76,7 @@ handle NetBSD-style pthread_setaffinity_np(3)
cpu_set_t cpuset;
if (pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset) == 0) {
-@@ -123,6 +164,7 @@ util_get_L3_for_pinned_thread(thrd_t thr
+@@ -138,6 +178,7 @@ util_get_L3_for_pinned_thread(thrd_t thr
return L3_index;
}
#endif