Skip to content

Commit

Permalink
Document portable_atomic_target_feature="zaamo" cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 26, 2024
1 parent 9983a8b commit 02597c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imp/interrupt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Some operations don't require disabling interrupts:

- On architectures except for AVR: loads and stores with pointer size or smaller
- On MSP430 additionally: {8,16}-bit `add,sub,and,or,xor,not`
- On RISC-V with the `zaamo` target feature (or `force-amo` feature or `portable_atomic_force_amo` cfg) additionally: 32-bit(RV32)/{32,64}-bit(RV64) `swap,fetch_{add,sub,and,or,xor,not,max,min},add,sub,and,or,xor,not`, {8,16}-bit `fetch_{and,or,xor,not},and,or,xor,not`[^1], and all operations of `AtomicBool`
- On RISC-V with the `zaamo` target feature (or `portable_atomic_target_feature="zaamo"` cfg or `force-amo` feature or `portable_atomic_force_amo` cfg) additionally: 32-bit(RV32)/{32,64}-bit(RV64) `swap,fetch_{add,sub,and,or,xor,not,max,min},add,sub,and,or,xor,not`, {8,16}-bit `fetch_{and,or,xor,not},and,or,xor,not`[^1], and all operations of `AtomicBool`

However, when the `critical-section` feature is enabled, critical sections are taken for all atomic operations.

Expand Down

0 comments on commit 02597c5

Please sign in to comment.