Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Don't double-lock in defmt #56

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Don't double-lock in defmt #56

merged 1 commit into from
Oct 24, 2023

Conversation

bugadani
Copy link
Contributor

@bugadani bugadani commented Oct 23, 2023

The defmt implementation already creates a critical section if enabled. It needs to, because the framing must not be interspersed with other output. This PR removes an inner lock in the do_write calls, making the driver a bit lighter.

Since we're waiting for the FIFO to clear this may not have any significant runtime effect.

@bugadani bugadani force-pushed the defmt branch 2 times, most recently from ac78112 to 195a975 Compare October 23, 2023 14:55
@bugadani

This comment was marked as resolved.

@bugadani bugadani force-pushed the defmt branch 2 times, most recently from 7869d93 to 45b7ae9 Compare October 23, 2023 17:18
@bugadani bugadani marked this pull request as ready for review October 23, 2023 17:19
@bugadani bugadani force-pushed the defmt branch 2 times, most recently from 116786f to 9396dc0 Compare October 24, 2023 06:31
Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

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

LGTM - as you said probably won't show a huge effect but makes sense anyway

@bjoernQ bjoernQ merged commit a0ac25b into esp-rs:main Oct 24, 2023
28 checks passed
@bugadani bugadani deleted the defmt branch October 24, 2023 06:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants