From ebf2f058a4d2a1fcf118144b9893dc3038939bad Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Thu, 18 Feb 2021 19:30:59 +0100 Subject: Now with new monotonic trait and crate --- macros/src/codegen/util.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'macros/src/codegen/util.rs') diff --git a/macros/src/codegen/util.rs b/macros/src/codegen/util.rs index 287ba408..7a12f23e 100644 --- a/macros/src/codegen/util.rs +++ b/macros/src/codegen/util.rs @@ -239,6 +239,16 @@ pub fn tq_ident(name: &str) -> Ident { Ident::new(&format!("TQ_{}", name), Span::call_site()) } +/// Generates an identifier for monotonic timer storage +pub fn monotonic_ident(name: &str) -> Ident { + Ident::new(&format!("MONOTONIC_STORAGE_{}", name), Span::call_site()) +} + +/// Generates an identifier for monotonic timer storage +pub fn mangle_monotonic_type(name: &str) -> Ident { + Ident::new(&format!("MonotonicMangled{}", name), Span::call_site()) +} + /// The name to get better RT flag errors pub fn rt_err_ident() -> Ident { Ident::new( -- cgit v1.2.3