Remove _pthread_isduecanceled in favor of ->cancel. NFC.#15625
Merged
sbc100 merged 2 commits intoemscripten-core:mainfrom Nov 30, 2021
Merged
Remove _pthread_isduecanceled in favor of ->cancel. NFC.#15625sbc100 merged 2 commits intoemscripten-core:mainfrom
sbc100 merged 2 commits intoemscripten-core:mainfrom
Conversation
Also simplify the wait in slices logic a bit, while we're at it.
sbc100
reviewed
Nov 24, 2021
| #include "pthread_impl.h" | ||
| #include <pthread.h> | ||
|
|
||
| int _pthread_isduecanceled(struct pthread* pthread_ptr) { |
Collaborator
There was a problem hiding this comment.
Sorry to be a pain but can you make the PR only about the removal of this function.. I really like simple PRs that do just one thing.
Collaborator
Author
There was a problem hiding this comment.
No problem, I thought this simplification was too small for a dedicated PR, but maybe that doesn't matter. Reverted with commit 1bb8198.
kleisauke
added a commit
to kleisauke/emscripten
that referenced
this pull request
Nov 29, 2021
sbc100
approved these changes
Nov 30, 2021
| double sleepUntilTime = emscripten_get_now() + msecsToSleep; | ||
| do { | ||
| if (_pthread_isduecanceled(pthread_self())) { | ||
| if (pthread_self()->cancel) { |
Collaborator
There was a problem hiding this comment.
As a followup we should replace pthread_self with __pthread_self in all our musl-internal code.
Also, pthread_t self = __pthread_self(); would probably make sense here.
mmarczell-graphisoft
pushed a commit
to GRAPHISOFT/emscripten
that referenced
this pull request
Jan 5, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also simplify the wait in slices logic a bit, while we're at it.I'll make another PR for that.Split from PR #15603.