diff options
author | 2023-01-02 14:34:05 +0100 | |
---|---|---|
committer | 2023-03-01 00:31:01 +0100 | |
commit | 582c602912592ec7ebea3096aefa02aea99c2143 (patch) | |
tree | 96b14a130788960ee06d7e80adec43a167b4844b /macros/src/syntax/analyze.rs | |
parent | 7614b96fe45240dafe91ae549e712b560e2d4c10 (diff) | |
download | rtic-582c602912592ec7ebea3096aefa02aea99c2143.tar.gz rtic-582c602912592ec7ebea3096aefa02aea99c2143.tar.zst rtic-582c602912592ec7ebea3096aefa02aea99c2143.zip |
Old xtask test pass
Diffstat (limited to 'macros/src/syntax/analyze.rs')
-rw-r--r-- | macros/src/syntax/analyze.rs | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/macros/src/syntax/analyze.rs b/macros/src/syntax/analyze.rs index 06b23f46..44960b9e 100644 --- a/macros/src/syntax/analyze.rs +++ b/macros/src/syntax/analyze.rs @@ -338,8 +338,8 @@ pub(crate) fn app(app: &App) -> Result<Analysis, syn::Error> { }) } -/// Priority ceiling -pub type Ceiling = Option<u8>; +// /// Priority ceiling +// pub type Ceiling = Option<u8>; /// Task priority pub type Priority = u8; @@ -427,22 +427,22 @@ pub enum Ownership { }, } -impl Ownership { - /// Whether this resource needs to a lock at this priority level - pub fn needs_lock(&self, priority: u8) -> bool { - match self { - Ownership::Owned { .. } | Ownership::CoOwned { .. } => false, - - Ownership::Contended { ceiling } => { - debug_assert!(*ceiling >= priority); - - priority < *ceiling - } - } - } - - /// Whether this resource is exclusively owned - pub fn is_owned(&self) -> bool { - matches!(self, Ownership::Owned { .. }) - } -} +// impl Ownership { +// /// Whether this resource needs to a lock at this priority level +// pub fn needs_lock(&self, priority: u8) -> bool { +// match self { +// Ownership::Owned { .. } | Ownership::CoOwned { .. } => false, +// +// Ownership::Contended { ceiling } => { +// debug_assert!(*ceiling >= priority); +// +// priority < *ceiling +// } +// } +// } +// +// /// Whether this resource is exclusively owned +// pub fn is_owned(&self) -> bool { +// matches!(self, Ownership::Owned { .. }) +// } +// } |