Skip to content

Commit

Permalink
Merge #233
Browse files Browse the repository at this point in the history
233: Flip111/patch 8 r=adamgreig a=jamesmunns

Supersedes #164

Co-authored-by: flip111 <flip101@gmail.com>
Co-authored-by: James Munns <james.munns@ferrous-systems.com>
  • Loading branch information
3 people authored Apr 26, 2020
2 parents 668fb07 + a65223f commit 773d7d6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/concurrency/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ for two reasons:
If `COUNTER` was being shared by multiple interrupt handlers that might
_preempt_ each other, then each one might require a critical section as well.

This solves our immediate problem, but we're still left writing a lot of
`unsafe` code which we need to carefully reason about, and we might be using
critical sections needlessly — which comes at a cost to overhead and interrupt
latency and jitter.
This solves our immediate problem, but we're still left writing a lot of unsafe code which we need to carefully reason about, and we might be using critical sections needlessly. Since each critical section temporarily pauses interrupt processing, there is an associated cost of some extra code size and higher interrupt latency and jitter (interrupts may take longer to be processed, and the time until they are processed will be more variable). Whether this is a problem depends on your system, but in general we'd like to avoid it.

It's worth noting that while a critical section guarantees no interrupts will
fire, it does not provide an exclusivity guarantee on multi-core systems! The
Expand Down

0 comments on commit 773d7d6

Please sign in to comment.