defmt-rtt: fix check for blocking RTT#579
Merged
bors[bot] merged 1 commit intoknurling-rs:mainfrom Sep 15, 2021
jonas-schievink:fix-check-for-blocking-rtt
Merged
defmt-rtt: fix check for blocking RTT#579bors[bot] merged 1 commit intoknurling-rs:mainfrom jonas-schievink:fix-check-for-blocking-rtt
bors[bot] merged 1 commit intoknurling-rs:mainfrom
jonas-schievink:fix-check-for-blocking-rtt
Conversation
japaric
reviewed
Sep 15, 2021
| fn host_is_connected(channel: &Channel) -> bool { | ||
| // we assume that a host is connected if we are in blocking-mode. this is what probe-run does. | ||
| channel.flags.load(Ordering::Relaxed) == BLOCK_IF_FULL | ||
| channel.flags.load(Ordering::Relaxed) & BLOCK_IF_FULL != 0 |
Member
There was a problem hiding this comment.
as the first 2 bits are a 3-state bitfield (0, 1 or 2). could you change this to load & mask == BLOCK_IF_FULL where mask = 0b11?
Member
|
Thanks! bors r+ |
Contributor
|
Build succeeded: |
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.
This check wasn't testing correctly whether the
BLOCK_IF_FULLbit was set, leading to knurling-rs/probe-run#257 breaking probe-run.