pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/MesaLib MesaLib: don't hard error when pthrea...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e5404bb2486f
branches:  trunk
changeset: 402946:e5404bb2486f
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat Oct 19 10:29:57 2019 +0000

description:
MesaLib: don't hard error when pthread _np functions are missing

diffstat:

 graphics/MesaLib/distinfo                           |   4 +-
 graphics/MesaLib/patches/patch-src_util_u__thread.h |  22 +++++++++++++++-----
 2 files changed, 18 insertions(+), 8 deletions(-)

diffs (69 lines):

diff -r d2348e4cae38 -r e5404bb2486f graphics/MesaLib/distinfo
--- a/graphics/MesaLib/distinfo Sat Oct 19 09:44:18 2019 +0000
+++ b/graphics/MesaLib/distinfo Sat Oct 19 10:29:57 2019 +0000
@@ -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_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 -r d2348e4cae38 -r e5404bb2486f graphics/MesaLib/patches/patch-src_util_u__thread.h
--- a/graphics/MesaLib/patches/patch-src_util_u__thread.h       Sat Oct 19 09:44:18 2019 +0000
+++ b/graphics/MesaLib/patches/patch-src_util_u__thread.h       Sat Oct 19 10:29:57 2019 +0000
@@ -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 @@
     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 @@
  }
  
  /**
-@@ -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 @@
     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



Home | Main Index | Thread Index | Old Index