File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -46,15 +46,6 @@ private let _waitThreadNoChildrenCondition = {
46
46
return UncheckedSendable ( rawValue: result)
47
47
} ( )
48
48
49
- #if os(Linux)
50
- /// Set the name of the current thread.
51
- ///
52
- /// This function declaration is provided because `pthread_setname_np()` is
53
- /// only declared if `_GNU_SOURCE` is set, but setting it causes build errors
54
- /// due to conflicts with Swift's Glibc module.
55
- @_extern ( c) func pthread_setname_np( _: pthread_t , _: UnsafePointer < CChar > ) -> CInt
56
- #endif
57
-
58
49
/// The implementation of `_createWaitThread()`, run only once.
59
50
private let _createWaitThreadImpl : Void = {
60
51
// The body of the thread's run loop.
Original file line number Diff line number Diff line change @@ -88,6 +88,13 @@ SWT_EXTERN char *_Nullable *_Null_unspecified environ;
88
88
static char * _Nullable * _Null_unspecified swt_environ (void ) {
89
89
return environ ;
90
90
}
91
+
92
+ /// Set the name of the current thread.
93
+ ///
94
+ /// This function declaration is provided because `pthread_setname_np()` is
95
+ /// only declared if `_GNU_SOURCE` is set, but setting it causes build errors
96
+ /// due to conflicts with Swift's Glibc module.
97
+ SWT_IMPORT_FROM_STDLIB int pthread_setname_np (pthread_t , const char * );
91
98
#endif
92
99
93
100
#if __has_include (< signal .h > ) && defined(si_pid )
You can’t perform that action at this time.
0 commit comments