Skip to content

Commit

Permalink
riot-rs-macros: use thread_create_noarg() in thread macro
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Mar 5, 2024
1 parent d808120 commit 9387590
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/riot-rs-macros/src/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,13 @@ pub fn thread(args: TokenStream, item: TokenStream) -> TokenStream {

let expanded = quote! {
#no_mangle_attr
#[inline(always)]
#thread_function

#[#riot_rs_crate::linkme::distributed_slice(#riot_rs_crate::thread::THREAD_FNS)]
#[linkme(crate = #riot_rs_crate::linkme)]
fn #slice_fn_name_ident() {
fn trampoline(_arg: ()) {
#fn_name();
}
let stack = #riot_rs_crate::static_cell::make_static!([0u8; #stack_size as usize]);
#riot_rs_crate::thread::thread_create(trampoline, (), stack, #priority);
#riot_rs_crate::thread::thread_create_noarg(#fn_name, stack, #priority);
}
};

Expand Down

0 comments on commit 9387590

Please sign in to comment.