Skip to content

port SwiftPrivatePthreadExtras to Windows #20719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 29, 2018

Conversation

compnerd
Copy link
Member

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd compnerd force-pushed the threading-extras branch 4 times, most recently from f3e3c1a to fe4fd9a Compare November 26, 2018 05:09
@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - fe4fd9a50311815afd620bba6a5b2f7ea1d4b43e

@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - fe4fd9a50311815afd620bba6a5b2f7ea1d4b43e

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - fe4fd9a50311815afd620bba6a5b2f7ea1d4b43e

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.
These were not in use, and removing this from the signature makes it
possible to re-use the exact signature on Windows more easily.
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.
This is needed to build the threading extras.
…reaing

Port the block based thread constructor to Windows threading model, and
rename it to `_stdlib_create_thread_block`.
Implement `_stdlib_pthread_join` in terms of windows threading.
Additionally, rename it to `_stdlib_thread_join`.
This has been generalized enough to permit building on Windows with
Windows threading primitives.
@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 15f21ec856cf70bf57991ec5c9aac76e3236ae22

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 15f21ec856cf70bf57991ec5c9aac76e3236ae22

@compnerd
Copy link
Member Author

CC: @jrose-apple ... not sure of a good person to ask to take a look at this change, and I'm not sure if there is something Apple internal which might be impacted here.

@jrose-apple
Copy link
Contributor

It counts as part of the stdlib, so maybe @lancep or @lorentey? It looks reasonable to me, and I don't think there'll be anything Apple-internal to worry about other than possible private tests, which are our problem anyway. (I didn't actually check though.)

Copy link
Member

@lorentey lorentey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! (I'm not too familiar with this corner of the repo though.)

@compnerd compnerd merged commit c9cf8fc into swiftlang:master Nov 29, 2018
@compnerd compnerd deleted the threading-extras branch November 29, 2018 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants