diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2024-01-29 20:56:15 +0100 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2024-02-27 12:22:18 +0100 |
| commit | 27985009579e82673dcaf7a6a715fcf50c184863 (patch) | |
| tree | 8ae8f1cc9e8c6d2c2581467a4a537d8b84ae6552 /rtic-macros/src/codegen/util.rs | |
| parent | d2e84799c743eeb4b827d8da576be45ed43d6ece (diff) | |
Make RTIC 2 work on stable by using `main`'s stack as an allocator
Diffstat (limited to 'rtic-macros/src/codegen/util.rs')
| -rw-r--r-- | rtic-macros/src/codegen/util.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rtic-macros/src/codegen/util.rs b/rtic-macros/src/codegen/util.rs index 430e853..b4682ee 100644 --- a/rtic-macros/src/codegen/util.rs +++ b/rtic-macros/src/codegen/util.rs @@ -8,7 +8,6 @@ pub use super::bindings::interrupt_ident; const RTIC_INTERNAL: &str = "__rtic_internal"; - /// Mark a name as internal pub fn mark_internal_name(name: &str) -> Ident { Ident::new(&format!("{RTIC_INTERNAL}_{name}"), Span::call_site()) @@ -166,3 +165,11 @@ pub fn rt_err_ident() -> Ident { Span::call_site(), ) } + +pub fn from_ptr_n_args_ident(n: usize) -> Ident { + Ident::new(&format!("from_ptr_{}_args", n + 1), Span::call_site()) +} + +pub fn new_n_args_ident(n: usize) -> Ident { + Ident::new(&format!("new_{}_args", n + 1), Span::call_site()) +} |
