Skip to content

Commit

Permalink
shell: Drop old XFA mechanism
Browse files Browse the repository at this point in the history
See-Also: RIOT-OS/RIOT#20958
See-Also: #134
  • Loading branch information
chrysn committed Nov 22, 2024
1 parent cdf3fc2 commit 8dcad3e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,20 +433,13 @@ macro_rules! static_command {
// thus static, and the_function is static by construction as well)
unsafe impl Sync for StaticCommand {}

// Starting with https://github.com/RIOT-OS/RIOT/pull/20958 shell commands will be an
// array of the struct
#[link_section = ".roxfa.shell_commands_xfa_v2.5"]
#[export_name = concat!("shell_commands_xfa_v2_5_", stringify!($modname))]
static THE_STRUCT: StaticCommand = StaticCommand($crate::riot_sys::shell_command_t {
name: $crate::cstr::cstr!($name).as_ptr() as _,
desc: $crate::cstr::cstr!($descr).as_ptr() as _,
handler: Some(the_function),
});
// Before https://github.com/RIOT-OS/RIOT/pull/20958 shell commands was an array of
// pointers. We provide both and let the linker perform garbage collection.
#[link_section = ".roxfa.shell_commands_xfa.5"]
#[export_name = concat!("shell_commands_xfa_5_", stringify!($modname))]
static THE_POINTER: &StaticCommand = &THE_STRUCT;

unsafe extern "C" fn the_function(
argc: i32,
Expand Down

0 comments on commit 8dcad3e

Please sign in to comment.