mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Cleanup from review (needs releases to compile)
This commit is contained in:
parent
98d2af9d73
commit
8f37043782
13 changed files with 11 additions and 218 deletions
|
|
@ -23,4 +23,4 @@ proc-macro-error = "1"
|
|||
quote = "1"
|
||||
syn = "1"
|
||||
# rtic-syntax = "0.5.0-alpha.3"
|
||||
rtic-syntax = { git = "https://github.com/rtic-rs/rtic-syntax.git", branch = "resources_take_2" }
|
||||
rtic-syntax = { git = "https://github.com/rtic-rs/rtic-syntax.git" }
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ pub fn codegen(
|
|||
|
||||
let attrs = &res.attrs;
|
||||
// late resources in `util::link_section_uninit`
|
||||
let section = util::link_section_uninit(true);
|
||||
let section = util::link_section_uninit();
|
||||
|
||||
// For future use
|
||||
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
||||
|
|
|
|||
|
|
@ -198,9 +198,6 @@ pub fn codegen(
|
|||
pub use super::#internal_context_name as Context;
|
||||
));
|
||||
|
||||
// not sure if this is the right way, maybe its backwards,
|
||||
// that spawn_module should put in in root
|
||||
|
||||
if let Context::SoftwareTask(..) = ctxt {
|
||||
let spawnee = &app.software_tasks[name];
|
||||
let priority = spawnee.args.priority;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ pub fn codegen(
|
|||
let mangled_name = util::mark_internal_ident(&util::static_shared_resource_ident(&name));
|
||||
|
||||
// late resources in `util::link_section_uninit`
|
||||
let section = util::link_section_uninit(true);
|
||||
let section = util::link_section_uninit();
|
||||
let attrs = &res.attrs;
|
||||
|
||||
// For future use
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ pub fn codegen(
|
|||
quote!(rtic::export::Queue(unsafe {
|
||||
rtic::export::iQueue::u8_sc()
|
||||
})),
|
||||
Box::new(|| util::link_section_uninit(true)),
|
||||
Box::new(|| util::link_section_uninit()),
|
||||
)
|
||||
};
|
||||
mod_app.push(quote!(
|
||||
|
|
|
|||
|
|
@ -152,13 +152,8 @@ fn link_section_index() -> usize {
|
|||
}
|
||||
|
||||
// NOTE `None` means in shared memory
|
||||
pub fn link_section_uninit(empty_expr: bool) -> Option<TokenStream2> {
|
||||
let section = if empty_expr {
|
||||
let index = link_section_index();
|
||||
format!(".uninit.rtic{}", index)
|
||||
} else {
|
||||
format!(".uninit.rtic{}", link_section_index())
|
||||
};
|
||||
pub fn link_section_uninit() -> Option<TokenStream2> {
|
||||
let section = format!(".uninit.rtic{}", link_section_index());
|
||||
|
||||
Some(quote!(#[link_section = #section]))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue