aboutsummaryrefslogtreecommitdiffstats
path: root/testing/bees/10-pthread_getname1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/bees/10-pthread_getname1.patch')
-rw-r--r--testing/bees/10-pthread_getname1.patch36
1 files changed, 13 insertions, 23 deletions
diff --git a/testing/bees/10-pthread_getname1.patch b/testing/bees/10-pthread_getname1.patch
index 2a5d88c56ab..98f7798c109 100644
--- a/testing/bees/10-pthread_getname1.patch
+++ b/testing/bees/10-pthread_getname1.patch
@@ -1,23 +1,13 @@
---- bees-0.6.1/lib/task.cc
-+++ bees-0.6.1/lib/task.cc
-@@ -104,7 +104,6 @@
-
- char buf[24];
- memset(buf, '\0', sizeof(buf));
-- DIE_IF_MINUS_ERRNO(pthread_getname_np(pthread_self(), buf, sizeof(buf)));
- Cleanup pthread_name_cleaner([&]() {
- pthread_setname_np(pthread_self(), buf);
- });
---- bees-0.6.1/src/bees.cc
-+++ bees-0.6.1/src/bees.cc
-@@ -160,10 +160,6 @@
- // OK try the pthread name next.
- char buf[24];
- memset(buf, '\0', sizeof(buf));
-- int err = pthread_getname_np(pthread_self(), buf, sizeof(buf));
-- if (err) {
-- return string("pthread_getname_np: ") + strerror(err);
-- }
- buf[sizeof(buf) - 1] = '\0';
-
- // thread_getname_np returns process name
+diff --git a/lib/task.cc b/lib/task.cc
+index 9604ff2..238a841 100644
+--- a/lib/task.cc
++++ b/lib/task.cc
+@@ -32,8 +32,6 @@ namespace crucible {
+ pthread_getname()
+ {
+ char buf[thread_name_length + 1] = { 0 };
+- // We'll get an empty name if this fails...
+- pthread_getname_np(pthread_self(), buf, sizeof(buf));
+ // ...or at least null-terminated garbage
+ buf[thread_name_length] = '\0';
+ return buf;