File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1039,6 +1039,17 @@ _Py_DumpTraceback(int fd, PyThreadState *tstate)
1039
1039
dump_traceback (fd , tstate , 1 );
1040
1040
}
1041
1041
1042
+ #if defined(HAVE_PTHREAD_GETNAME_NP ) || defined(HAVE_PTHREAD_GET_NAME_NP )
1043
+ # if defined(__OpenBSD__ )
1044
+ /* pthread_*_np functions, especially pthread_{get,set}_name_np().
1045
+ pthread_np.h exists on both OpenBSD and FreeBSD but the latter declares
1046
+ pthread_getname_np() and pthread_setname_np() in pthread.h as long as
1047
+ __BSD_VISIBLE remains set.
1048
+ */
1049
+ # include <pthread_np.h>
1050
+ # endif
1051
+ #endif
1052
+
1042
1053
/* Write the thread identifier into the file 'fd': "Current thread 0xHHHH:\" if
1043
1054
is_current is true, "Thread 0xHHHH:\n" otherwise.
1044
1055
You can’t perform that action at this time.
0 commit comments