Saleem Abdulrasool
dcc10ba39f
SwiftPrivateThreadExtras: address improvement suggestions
...
Use `ThreadHandle(bitPattern:)` rather than `unsafeBitCast` for the
conversion of the `uintptr_t` to the `HANDLE`. Convert a variable from
`var` to `let` binding.
2019-02-16 10:31:04 -08:00
Saleem Abdulrasool
59371dba24
SwiftPrivateThreadExtras: fix casting due to API changes
...
The recent changes to the UnsafemutablePointer prevented the "abuse" of
the type for casting. Switch to `unsafeBitCast`. This should repair
the Windows build.
2019-02-13 08:13:47 -08:00
Xiaodi Wu
9fe28c6e55
[gardening] Fix header comments [NFC]
2018-12-02 15:38:41 -05:00
Saleem Abdulrasool
98d71ff38f
SwiftPrivateThreadExtras: clean up using WinSDK SDK overlay
...
Use the constants rather than hardcoding values.
2018-12-01 11:04:13 -08:00
Saleem Abdulrasool
c32daed203
SwiftPrivateThreadExtras: fix windows build
...
Missed casts and a let vs var issue. This was missed in the last bundle
of patches.
2018-11-29 22:19:00 -08:00
Saleem Abdulrasool
ce40d72641
stdlib: implement _stdlib_pthread_join in terms of Windows threading
...
Implement `_stdlib_pthread_join` in terms of windows threading.
Additionally, rename it to `_stdlib_thread_join`.
2018-11-26 13:10:00 -08:00
Saleem Abdulrasool
6bf7b9e711
stdlib: implement _stdlib_create_pthread_block in terms of Windows threaing
...
Port the block based thread constructor to Windows threading model, and
rename it to `_stdlib_create_thread_block`.
2018-11-26 13:10:00 -08:00
Saleem Abdulrasool
5e943981c7
stdlib: rename some variables in _stdlib_barrier
2018-11-26 13:10:00 -08:00
Saleem Abdulrasool
65bdce00b6
stdlib: rename _stdlib_PTHREAD_BARRIER_SERIAL_THREAD -> _stdlib_THREAD_BARRIER_SERIAL_THREAD
2018-11-26 13:10:00 -08:00
Saleem Abdulrasool
7b06586fe1
stdlib: rename _stdlib_pthread_barrier_t to _stdlib_thread_barrier_t
2018-11-26 13:09:49 -08:00
Saleem Abdulrasool
940db1b0cf
stdlib: remove pthread_attr_t from _stdlib_pthread_create_block
...
The attributes were not being used currently. Since this is a private
interface, remove the parameter as it makes it easier to port to
Windows.
2018-11-26 13:09:31 -08:00
Saleem Abdulrasool
82360c6b27
stdlib: remove pthread_barrier attributes
...
These were not in use, and removing this from the signature makes it
possible to re-use the exact signature on Windows more easily.
2018-11-26 13:09:31 -08:00
Saleem Abdulrasool
0693bec1f1
sdlib: rename SwiftPrivatePthreadExtras to SwiftPrivateThreadExtras
...
This is in preparation to make the code here more target agnostic for
porting to the Windows threading primitives. This is used pretty
extensively in the tests, so disabling tests would lose a chunk of
coverage.
2018-11-26 13:09:31 -08:00