File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ add_swift_target_library(swiftSwiftPrivateThreadExtras ${SWIFT_STDLIB_LIBRARY_BU
12
12
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
13
13
SWIFT_MODULE_DEPENDS_CYGWIN Glibc
14
14
SWIFT_MODULE_DEPENDS_HAIKU Glibc
15
- SWIFT_MODULE_DEPENDS_WINDOWS MSVCRT
15
+ SWIFT_MODULE_DEPENDS_WINDOWS MSVCRT WinSDK
16
16
SWIFT_COMPILE_FLAGS
17
17
INSTALL_IN_COMPONENT stdlib-experimental )
18
18
Original file line number Diff line number Diff line change @@ -116,10 +116,8 @@ public func _stdlib_thread_join<Result>(
116
116
_ resultType: Result . Type
117
117
) -> ( CInt , Result ? ) {
118
118
#if os(Windows)
119
- // TODO(compnerd) modularize rpc.h for INFINITE (0xffffffff)
120
- let result = WaitForSingleObject ( thread, 0xffffffff ) ;
121
- // TODO(compnerd) modularize WinBase.h for WAIT_OBJECT_0 (0)
122
- if result == 0 {
119
+ let result = WaitForSingleObject ( thread, INFINITE)
120
+ if result == WAIT_OBJECT_0 {
123
121
var threadResult : DWORD = 0
124
122
GetExitCodeThread ( thread, & threadResult)
125
123
CloseHandle ( thread)
Original file line number Diff line number Diff line change @@ -122,9 +122,8 @@ public func _stdlib_thread_barrier_wait(
122
122
if barrier. pointee. numThreadsWaiting < barrier. pointee. count {
123
123
// Put the thread to sleep.
124
124
#if os(Windows)
125
- // TODO(compnerd) modularize rpc.h to get INFIITE (0xffffffff)
126
125
if SleepConditionVariableSRW ( barrier. pointee. cond!, barrier. pointee. mutex!,
127
- 0xffffffff , 0 ) == 0 {
126
+ INFINITE , 0 ) == 0 {
128
127
return - 1
129
128
}
130
129
ReleaseSRWLockExclusive ( barrier. pointee. mutex!)
You can’t perform that action at this time.
0 commit comments