Commit Graph

8 Commits

Author SHA1 Message Date
Saleem Abdulrasool
83b290438c Windows: bridge BOOL to Bool
This allows the conversion of the Windows `BOOL` type to be converted to
`Bool` implicitly.  The implicit bridging allows for a more ergonomic
use of the native Windows APIs in Swift.

Due to the ambiguity between the Objective C `BOOL` and the Windows
`BOOL`, we must manually map the `BOOL` type to the appropriate type.
This required lifting the mapping entry for `ObjCBool` from the mapped
types XMACRO definition into the inline definition in the importer.

Take the opportunity to simplify the mapping code.

Adjust the standard library usage of the `BOOL` type which is now
eclipsed by the new `WindowsBool` type, preferring to use `Bool`
whenever possible.

Thanks to Jordan Rose for the suggestion to do this and a couple of
hints along the way.
2019-04-25 17:52:08 -07: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
e1d7ee79e4 stdlib: implement ThreadBarriers in terms of Windows threading 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
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