Skip to content

Concurrency: add Windows support to SWIFT_TASK_PRINTF_DEBUG #37803

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 1 commit into from
Jun 7, 2021

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jun 5, 2021

pthread_self is not portable to all platforms. Introduce a
_swift_get_current_thread_id to abstract over accessing the current
thread ID. On Windows, the thread ID and thread handle are two separate
entities, unlike POSIX threads which treats them the same.

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

Resolves SR-NNNN.

`pthread_self` is not portable to all platforms.  Introduce a
`_swift_get_current_thread_id` to abstract over accessing the current
thread ID.  On Windows, the thread ID and thread handle are two separate
entities, unlike POSIX threads which treats them the same.
@compnerd
Copy link
Member Author

compnerd commented Jun 5, 2021

@compnerd
Copy link
Member Author

compnerd commented Jun 5, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jun 6, 2021

Build failed
Swift Test OS X Platform
Git Sha - d09d4b9

@compnerd
Copy link
Member Author

compnerd commented Jun 6, 2021

@swift-ci please test macOS platform

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Thanks, looks good -- LGTM

@compnerd compnerd merged commit fccadb4 into swiftlang:main Jun 7, 2021
@compnerd compnerd deleted the printf-thread-id branch June 7, 2021 15:11
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.

3 participants