saltbundle-swig/remove-pthread_setname_np-test.patch

37 lines
950 B
Diff
Raw Permalink Normal View History

diff -urN a/Examples/test-suite/director_thread.i b/Examples/test-suite/director_thread.i
--- a/Examples/test-suite/director_thread.i 2022-11-30 08:35:05.000000000 +0100
+++ b/Examples/test-suite/director_thread.i 2024-01-27 17:33:22.863045414 +0100
@@ -105,24 +105,6 @@
MilliSecondSleep(500);
}
- void setThreadName() {
-%#ifdef _WIN32
-%#else
-
-%#ifdef __APPLE__
- int setname = pthread_setname_np("MyThreadName");
-%#else
- int setname = pthread_setname_np(pthread_self(), "MyThreadName");
-%#endif
-
- if (setname != 0) {
- errno = setname;
- perror("calling pthread_setname_np in setThreadName()");
- assert(0);
- }
-%#endif
- }
-
static bool namedThread() {
%#ifdef _WIN32
return false;
@@ -146,7 +128,6 @@
#endif
{
Foo* f = static_cast<Foo*>(t);
- f->setThreadName();
while (!get_thread_terminate()) {
MilliSecondSleep(50);
f->do_foo();