371: task_local and lock_free r=korken89 a=AfoHT

Getting this going to test with GHA

For further discussion see https://github.com/rtic-rs/rfcs/issues/30

Co-authored-by: Per <Per Lindgren>
Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
This commit is contained in:
bors[bot] 2020-10-15 16:01:07 +00:00 committed by GitHub
commit 1cda9eaecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 439 additions and 1 deletions

View file

@ -126,6 +126,20 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
let user_code = app.user_code.clone();
let name = &app.name;
let device = extra.device;
// Get the list of all tasks
// Currently unused, might be useful
let task_list = analysis.tasks.clone();
let mut tasks = vec![];
if !task_list.is_empty() {
tasks.push(quote!(
enum Tasks {
#(#task_list),*
}
));
}
quote!(
#(#user)*
@ -141,6 +155,9 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
#(#root_software_tasks)*
/// Unused
#(#tasks)*
/// Implementation details
mod #name {
/// Always include the device crate which contains the vector table