Skip to content

Commit 5f377b8

Browse files
committed
Update comment, changelog, and version
1 parent f1f6d30 commit 5f377b8

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Removed
11+
- `enable_cs` removed due to soundness hole when interacting with `Clone` and
12+
`interrupt::free`.
13+
1014
## [v0.2.2] - 2020-04-23
1115

1216
### Changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ keywords = ["msp430", "interrupt", "register", "peripheral"]
77
license = "MIT OR Apache-2.0"
88
name = "msp430"
99
repository = "https://github.com/rust-embedded/msp430"
10-
version = "0.2.2"
10+
version = "0.3.0"
1111

1212
[dependencies.bare-metal]
1313
features = ["const-fn"]

src/interrupt.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ pub fn disable() {
2323
///
2424
/// # Safety
2525
///
26-
/// - Do not call this function inside an `interrupt::free` critical section
26+
/// - In any function `f()` that calls `enable`, `CriticalSection` or `&CriticalSection` tokens cannot be used in `f()`'s body after the
27+
/// call to `enable`. If `f()` owns `CriticalSection` tokens, it is recommended to [`drop`](https://doc.rust-lang.org/nightly/core/mem/fn.drop.html)
28+
/// these tokens before calling `enable`.
2729
#[inline(always)]
2830
pub unsafe fn enable() {
2931
match () {

0 commit comments

Comments
 (0)