-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Concurrency: add Windows support to SWIFT_TASK_PRINTF_DEBUG
#39348
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
Conversation
`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.
@swift-ci please test |
CC: @ktoso @DougGregor |
This is a cherry-pick of #39348 to the 5.5 branch, though there were conflicts as there were changes that were applied out of order. |
@swift-ci test |
@compnerd is this known failure? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @compnerd !
For reference I don't think this would have been breaking anything since it was only in a macro that is only conditionally enabled during debugging... 🤔
@shahmishal - no, its not, I don't see that in the results though? |
@ktoso - its the missing include that causes problems - |
Oh I see, thank you for explaining! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me
pthread_self
is not portable to all platforms. Introduce a_swift_get_current_thread_id
to abstract over accessing the currentthread 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.