diff options
author | 2019-06-29 09:11:42 +0200 | |
---|---|---|
committer | 2019-06-29 09:11:57 +0200 | |
commit | be92041a592f65f38cee8475b61d35e7fcee3694 (patch) | |
tree | 3d7f59dff198183dee3920e790693a93063f3996 /macros/src/codegen/spawn.rs | |
parent | df4a7fd3e5df370a83fcdc24aa628bed3fa9f543 (diff) | |
download | rtic-be92041a592f65f38cee8475b61d35e7fcee3694.tar.gz rtic-be92041a592f65f38cee8475b61d35e7fcee3694.tar.zst rtic-be92041a592f65f38cee8475b61d35e7fcee3694.zip |
WIP
Diffstat (limited to 'macros/src/codegen/spawn.rs')
-rw-r--r-- | macros/src/codegen/spawn.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/macros/src/codegen/spawn.rs b/macros/src/codegen/spawn.rs index 1539e277..c63c410b 100644 --- a/macros/src/codegen/spawn.rs +++ b/macros/src/codegen/spawn.rs @@ -42,8 +42,10 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream None }; + let section = util::link_section("text", sender); methods.push(quote!( #(#cfgs)* + #section fn #name(&self #(,#args)*) -> Result<(), #ty> { #let_instant #body @@ -66,9 +68,11 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream let body = spawn_body::codegen(spawner, &name, app, analysis, extra); + let section = util::link_section("text", sender); items.push(quote!( #cfg_sender #(#cfgs)* + #section unsafe fn #spawn( priority: &rtfm::export::Priority #instant |