Skip to content

[exclusivity] Split out of Exclusivity.cpp FunctionReplacement and the Global TLSContext. #38622

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

Conversation

gottesmm
Copy link
Contributor

Some notes:

  1. Even though I refactored out AccessSet/Access from Exclusivity.cpp ->
    ExclusivityPrivate.h, I left the actual implementations of insert/remove in
    Exclusivity.cpp to allow for the most aggressive optimization for use in
    Exclusivity.cpp without exposing a bunch of internal details to other parts of
    the runtime. Smaller routines like getHead() and manipulating the linked list
    directly I left as methods that can be used by other parts of the runtime. I am
    going to use these methods to enable backwards deployment of exclusivity support
    for concurrency.

  2. I moved function replacements out of the Exclusivity header/cpp files since
    it has nothing to do with Exclusivity beyond taking advantage of the TLS context
    that we are already using.

@gottesmm gottesmm requested review from atrick and aschwaighofer July 25, 2021 19:57
@gottesmm
Copy link
Contributor Author

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ab117dad924739b4bf584f92e6c9e2b1deca0aff

@gottesmm
Copy link
Contributor Author

@swift-ci test OS X platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ab117dad924739b4bf584f92e6c9e2b1deca0aff

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

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

lgtm. afaict this is only moving stuff around and should be nfc.

@gottesmm
Copy link
Contributor Author

@aschwaighofer just wanted you to be aware of it.

…e Global TLSContext.

Some notes:

1. Even though I refactored out AccessSet/Access from Exclusivity.cpp ->
ExclusivityPrivate.h, I left the actual implementations of insert/remove in
Exclusivity.cpp to allow for the most aggressive optimization for use in
Exclusivity.cpp without exposing a bunch of internal details to other parts of
the runtime. Smaller routines like getHead() and manipulating the linked list
directly I left as methods that can be used by other parts of the runtime. I am
going to use these methods to enable backwards deployment of exclusivity support
for concurrency.

2. I moved function replacements out of the Exclusivity header/cpp files since
it has nothing to do with Exclusivity beyond taking advantage of the TLS context
that we are already using.
@gottesmm gottesmm force-pushed the pr-6947135ffaebc2f84fcc96a081d32e9829585992 branch from ab117da to 3e64d03 Compare July 26, 2021 19:26
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

Figured out the problem. Needed some more includes for the simulator/etc.

@gottesmm gottesmm merged commit 58804f7 into swiftlang:main Jul 27, 2021
@gottesmm gottesmm deleted the pr-6947135ffaebc2f84fcc96a081d32e9829585992 branch July 27, 2021 01:36
Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

@gottesmm thanks

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