diff --git a/README.md b/README.md index 49ce742bf4..66d32039e0 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { System::configure_systick(b); Objects { - task: Task::build() + task: Task::define() .start(task_body) .priority(2) .active(true) diff --git a/examples/basic/src/main.rs b/examples/basic/src/main.rs index 6fa68b4a82..a027f0996a 100644 --- a/examples/basic/src/main.rs +++ b/examples/basic/src/main.rs @@ -25,14 +25,14 @@ const COTTAGE: Objects = r3_kernel::build!(SystemTraits, configure_app => Object const fn configure_app(b: &mut r3_kernel::Cfg<'_, SystemTraits>) -> Objects { b.num_task_priority_levels(4); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body) .priority(2) .active(true) .finish(b); - let task2 = Task::build().start(task2_body).priority(3).finish(b); + let task2 = Task::define().start(task2_body).priority(3).finish(b); - let mutex1 = Mutex::build().finish(b); + let mutex1 = Mutex::define().finish(b); Objects { task1, diff --git a/examples/basic_gr_peach/src/main.rs b/examples/basic_gr_peach/src/main.rs index 6228c96176..3dc3e44b30 100644 --- a/examples/basic_gr_peach/src/main.rs +++ b/examples/basic_gr_peach/src/main.rs @@ -70,7 +70,7 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { SystemTraits::configure_os_timer(b); // Initialize the serial port - StartupHook::build() + StartupHook::define() .start(|_| { use support_rza1::serial::ScifExt; @@ -89,12 +89,12 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { }) .finish(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body) .priority(2) .active(true) .finish(b); - let task2 = Task::build().start(task2_body).priority(3).finish(b); + let task2 = Task::define().start(task2_body).priority(3).finish(b); Objects { task1, task2 } } diff --git a/examples/basic_nucleo_f401re/src/main.rs b/examples/basic_nucleo_f401re/src/main.rs index 117ac96385..8671851f8d 100644 --- a/examples/basic_nucleo_f401re/src/main.rs +++ b/examples/basic_nucleo_f401re/src/main.rs @@ -47,7 +47,7 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { // Initialize RTT (Real-Time Transfer) with a single up channel and set // it as the print channel for the printing macros - StartupHook::build() + StartupHook::define() .start(|_| { rtt_target::rtt_init_print!(); }) @@ -55,14 +55,14 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { SystemTraits::configure_systick(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body) .priority(2) .active(true) .finish(b); - let task2 = Task::build().start(task2_body).priority(3).finish(b); + let task2 = Task::define().start(task2_body).priority(3).finish(b); - let mutex1 = Mutex::build().finish(b); + let mutex1 = Mutex::define().finish(b); Objects { task1, diff --git a/examples/basic_rp_pico/src/main.rs b/examples/basic_rp_pico/src/main.rs index 1422f6015f..a937f920e3 100644 --- a/examples/basic_rp_pico/src/main.rs +++ b/examples/basic_rp_pico/src/main.rs @@ -73,7 +73,7 @@ const COTTAGE: Objects = r3_kernel::build!(SystemTraits, configure_app => Object const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { b.num_task_priority_levels(4); - StartupHook::build() + StartupHook::define() .start(|_| { // Configure peripherals let p = unsafe { rp2040::Peripherals::steal() }; @@ -115,14 +115,14 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { SystemTraits::configure_systick(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body) .priority(2) .active(true) .finish(b); - let task2 = Task::build().start(task2_body).priority(3).finish(b); + let task2 = Task::define().start(task2_body).priority(3).finish(b); - let mutex1 = Mutex::build().finish(b); + let mutex1 = Mutex::define().finish(b); Objects { task1, diff --git a/examples/basic_wio_terminal/src/main.rs b/examples/basic_wio_terminal/src/main.rs index c5849bd910..4c6d2ec368 100644 --- a/examples/basic_wio_terminal/src/main.rs +++ b/examples/basic_wio_terminal/src/main.rs @@ -109,7 +109,7 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { b.num_task_priority_levels(4); // Register a hook to initialize hardware - StartupHook::build() + StartupHook::define() .start(|_| { init_hardware(); }) @@ -119,46 +119,46 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { SystemTraits::configure_systick(b); // Miscellaneous tasks - let _noisy_task = Task::build() + let _noisy_task = Task::define() .start(noisy_task_body) .priority(0) .active(true) .finish(b); - let button_reporter_task = Task::build() + let button_reporter_task = Task::define() .start(button_reporter_task_body) .priority(2) .active(true) .finish(b); - let _blink_task = Task::build() + let _blink_task = Task::define() .start(blink_task_body) .priority(1) .active(true) .finish(b); // USB input handler - let usb_in_task = Task::build() + let usb_in_task = Task::define() .start(usb_in_task_body) .priority(2) .active(true) .finish(b); - let usb_poll_timer = Timer::build() + let usb_poll_timer = Timer::define() .start(usb_poll_timer_handler) .delay(r3::time::Duration::from_millis(0)) // Should be < 10ms for USB compliance .period(r3::time::Duration::from_millis(5)) .finish(b); let usb_interrupt_lines = [ - InterruptLine::build() + InterruptLine::define() .line(interrupt::USB_OTHER as InterruptNum + port::INTERRUPT_EXTERNAL0) .priority(1) .enabled(true) .finish(b), - InterruptLine::build() + InterruptLine::define() .line(interrupt::USB_TRCPT0 as InterruptNum + port::INTERRUPT_EXTERNAL0) .priority(1) .enabled(true) .finish(b), - InterruptLine::build() + InterruptLine::define() .line(interrupt::USB_TRCPT1 as InterruptNum + port::INTERRUPT_EXTERNAL0) .priority(1) .enabled(true) @@ -166,18 +166,18 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { ]; // Graphics-related tasks and objects - let _animation_task = Task::build() + let _animation_task = Task::define() .start(animation_task_body) .priority(2) .active(true) .finish(b); - let _console_task = Task::build() + let _console_task = Task::define() .start(console_task_body) .priority(3) .active(true) .finish(b); let console_pipe = queue::Queue::new(b); - let lcd_mutex = Mutex::build().finish(b); + let lcd_mutex = Mutex::define().finish(b); Objects { console_pipe, @@ -686,9 +686,9 @@ mod queue { C: ~const traits::CfgBase + ~const traits::CfgMutex, { Self { - st: Mutex::build().finish(cfg), - reader_lock: Mutex::build().finish(cfg), - writer_lock: Mutex::build().finish(cfg), + st: Mutex::define().finish(cfg), + reader_lock: Mutex::define().finish(cfg), + writer_lock: Mutex::define().finish(cfg), } } diff --git a/examples/smp_rp_pico/src/core0.rs b/examples/smp_rp_pico/src/core0.rs index fe6336de12..f157bbedfa 100644 --- a/examples/smp_rp_pico/src/core0.rs +++ b/examples/smp_rp_pico/src/core0.rs @@ -54,7 +54,7 @@ const COTTAGE: Objects = r3_kernel::build!(SystemTraits, configure_app => Object const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { b.num_task_priority_levels(4); - StartupHook::build() + StartupHook::define() .start(|_| { // Configure peripherals let p = unsafe { rp2040::Peripherals::steal() }; @@ -87,18 +87,18 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { SystemTraits::configure_systick(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body) .priority(2) .active(true) .finish(b); - let task2 = Task::build().start(task2_body).priority(3).finish(b); + let task2 = Task::define().start(task2_body).priority(3).finish(b); - let mutex1 = Mutex::build().finish(b); + let mutex1 = Mutex::define().finish(b); // Listen for messages from core1 let int_fifo = rp2040::Interrupt::SIO_IRQ_PROC0 as InterruptNum + port::INTERRUPT_EXTERNAL0; - InterruptLine::build() + InterruptLine::define() .line(int_fifo) // The priority should be lower than USB interrupts so that USB packets // can handled by the USB interrupt handler while we are doing @@ -106,7 +106,7 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { .priority(0x40) .enabled(true) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_fifo) .start(|_| { let p = unsafe { rp2040::Peripherals::steal() }; diff --git a/examples/smp_rp_pico/src/core1.rs b/examples/smp_rp_pico/src/core1.rs index 089a91ebeb..ac07628fcd 100644 --- a/examples/smp_rp_pico/src/core1.rs +++ b/examples/smp_rp_pico/src/core1.rs @@ -180,7 +180,7 @@ const fn configure_app(b: &mut r3_kernel::Cfg) -> Objects { SystemTraits::configure_systick(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body) .priority(2) .active(true) diff --git a/src/r3/src/hunk.rs b/src/r3/src/hunk.rs index 7e15a6baf8..3064fcac31 100644 --- a/src/r3/src/hunk.rs +++ b/src/r3/src/hunk.rs @@ -46,7 +46,7 @@ unsafe impl Sync for Hunk {} impl Hunk { /// Construct a `HunkDefiner` to define a hunk in [a configuration /// function](crate#static-configuration). - pub const fn build() -> HunkDefiner { + pub const fn define() -> HunkDefiner { HunkDefiner { _phantom: PhantomData, len: 1, @@ -151,7 +151,7 @@ impl> self, cfg: &mut Cfg, ) -> Hunk { - let untyped_hunk = kernel::Hunk::::build() + let untyped_hunk = kernel::Hunk::::define() .len(mem::size_of::()) .align(max(mem::align_of::(), self.align)) .finish(cfg); @@ -163,7 +163,7 @@ impl> // Insert an initializer if InitTag::NEEDS_INIT { unsafe { - StartupHook::build() + StartupHook::define() .priority(INIT_HOOK_PRIORITY) .start(|start| { let untyped_hunk = kernel::Hunk::::from_offset(start).as_ptr(); @@ -193,7 +193,7 @@ impl> ) -> Hunk { assert!(self.align.is_power_of_two(), "`align` is not power of two"); - let untyped_hunk = kernel::Hunk::::build() + let untyped_hunk = kernel::Hunk::::define() .len(mem::size_of::() * self.len) .align(max(mem::align_of::(), self.align)) .finish(cfg); diff --git a/src/r3/src/kernel/event_group.rs b/src/r3/src/kernel/event_group.rs index 6779148da6..1a6b4a0db9 100644 --- a/src/r3/src/kernel/event_group.rs +++ b/src/r3/src/kernel/event_group.rs @@ -89,7 +89,7 @@ impl EventGroup { impl EventGroup { /// Construct a `EventGroupDefiner` to define an event group in [a /// configuration function](crate#static-configuration). - pub const fn build() -> EventGroupDefiner { + pub const fn define() -> EventGroupDefiner { EventGroupDefiner::new() } diff --git a/src/r3/src/kernel/hook.rs b/src/r3/src/kernel/hook.rs index bc9e799e07..eec56d3995 100644 --- a/src/r3/src/kernel/hook.rs +++ b/src/r3/src/kernel/hook.rs @@ -25,7 +25,7 @@ pub struct StartupHook(PhantomInvariant); impl StartupHook { /// Construct a `StartupHookDefiner` to register a startup hook in /// [a configuration function](crate#static-configuration). - pub const fn build() -> StartupHookDefiner { + pub const fn define() -> StartupHookDefiner { StartupHookDefiner::new() } diff --git a/src/r3/src/kernel/hunk.rs b/src/r3/src/kernel/hunk.rs index 8f9c5e50e0..56a6465f18 100644 --- a/src/r3/src/kernel/hunk.rs +++ b/src/r3/src/kernel/hunk.rs @@ -55,7 +55,7 @@ impl Copy for Hunk {} impl Hunk { /// Construct a `HunkDefiner` to define a hunk in [a /// configuration function](crate#static-configuration). - pub const fn build() -> HunkDefiner { + pub const fn define() -> HunkDefiner { HunkDefiner::new() } diff --git a/src/r3/src/kernel/interrupt.rs b/src/r3/src/kernel/interrupt.rs index e23317ad34..adb95dc26d 100644 --- a/src/r3/src/kernel/interrupt.rs +++ b/src/r3/src/kernel/interrupt.rs @@ -66,7 +66,7 @@ impl InterruptLine { impl InterruptLine { /// Construct a `InterruptLineDefiner` to define an interrupt line in [a /// configuration function](crate#static-configuration). - pub const fn build() -> InterruptLineDefiner { + pub const fn define() -> InterruptLineDefiner { InterruptLineDefiner::new() } @@ -175,7 +175,7 @@ impl InterruptHandler { /// Construct a `InterruptHandlerDefiner` to define an interrupt handler in /// [a configuration function](crate#static-configuration). - pub const fn build() -> InterruptHandlerDefiner { + pub const fn define() -> InterruptHandlerDefiner { InterruptHandlerDefiner::new() } } @@ -366,7 +366,7 @@ impl InterruptHandlerDefiner { }; // Add a `CfgInterruptLineInfo` at the same time - InterruptLine::build().line(line_num).finish(cfg); + InterruptLine::define().line(line_num).finish(cfg); let order = cfg.interrupt_handlers.len(); cfg.interrupt_handlers.push(CfgInterruptHandler { diff --git a/src/r3/src/kernel/mutex.rs b/src/r3/src/kernel/mutex.rs index b941fceb6d..be26deec4e 100644 --- a/src/r3/src/kernel/mutex.rs +++ b/src/r3/src/kernel/mutex.rs @@ -55,7 +55,7 @@ pub use raw::MutexProtocol; /// C: ~const traits::CfgMutex, /// C::System: traits::KernelMutex, // FIXME: Why not implied by `CfgMutex`? /// { -/// let mutex = Mutex::build() +/// let mutex = Mutex::define() /// .protocol(MutexProtocol::Ceiling(1)) /// .finish(cfg); /// Objects { mutex } @@ -323,7 +323,7 @@ impl Mutex { impl Mutex { /// Construct a `MutexDefiner` to define a mutex in [a /// configuration function](crate#static-configuration). - pub const fn build() -> MutexDefiner { + pub const fn define() -> MutexDefiner { MutexDefiner::new() } diff --git a/src/r3/src/kernel/semaphore.rs b/src/r3/src/kernel/semaphore.rs index e31cfe74eb..42f8975d1c 100644 --- a/src/r3/src/kernel/semaphore.rs +++ b/src/r3/src/kernel/semaphore.rs @@ -87,7 +87,7 @@ impl Semaphore { impl Semaphore { /// Construct a `SemaphoreDefiner` to define a semaphore in [a /// configuration function](crate#static-configuration). - pub const fn build() -> SemaphoreDefiner { + pub const fn define() -> SemaphoreDefiner { SemaphoreDefiner::new() } diff --git a/src/r3/src/kernel/task.rs b/src/r3/src/kernel/task.rs index 6bb0c77916..f0b3e94e4e 100644 --- a/src/r3/src/kernel/task.rs +++ b/src/r3/src/kernel/task.rs @@ -125,7 +125,7 @@ impl Task { impl Task { /// Construct a `TaskDefiner` to define a mutex in [a configuration /// function](crate#static-configuration). - pub const fn build() -> TaskDefiner { + pub const fn define() -> TaskDefiner { TaskDefiner::new() } diff --git a/src/r3/src/kernel/timer.rs b/src/r3/src/kernel/timer.rs index c60b1ad5e9..80f9b6f066 100644 --- a/src/r3/src/kernel/timer.rs +++ b/src/r3/src/kernel/timer.rs @@ -281,7 +281,7 @@ use crate::{ /// C: ~const traits::CfgTimer, /// C::System: traits::KernelTimer, /// { -/// Timer::build() +/// Timer::define() /// .delay(Duration::from_millis(70)) /// .period(Duration::from_millis(40)) /// .active(true) @@ -321,7 +321,7 @@ use crate::{ /// C: ~const traits::CfgTimer, /// C::System: traits::KernelTimer, /// { -/// Timer::build() +/// Timer::define() /// .active(true) /// .start(|_| dbg!()) /// .finish(b) @@ -415,7 +415,7 @@ impl Timer { impl Timer { /// Construct a `TimerDefiner` to define a timer in [a /// configuration function](crate#static-configuration). - pub const fn build() -> TimerDefiner { + pub const fn define() -> TimerDefiner { TimerDefiner::new() } diff --git a/src/r3/src/lib.md b/src/r3/src/lib.md index 20aa711398..d39dfdd907 100644 --- a/src/r3/src/lib.md +++ b/src/r3/src/lib.md @@ -92,7 +92,7 @@ where + ~const traits::CfgTask, { b.num_task_priority_levels(4); - let task = Task::build() + let task = Task::define() .start(task_body).priority(3).active(true).finish(b); Objects { task } } @@ -133,7 +133,7 @@ mod m { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - let task = Task::build() + let task = Task::define() .start(task_body).priority(3).active(true).finish(b); MyModule { task } } diff --git a/src/r3/src/sync/mutex.rs b/src/r3/src/sync/mutex.rs index 9e68ac25b5..d8567471a4 100644 --- a/src/r3/src/sync/mutex.rs +++ b/src/r3/src/sync/mutex.rs @@ -166,10 +166,10 @@ where { /// Construct a `Definer` to define a mutex in [a configuration /// function](crate#static-configuration). - pub const fn build() -> Definer { + pub const fn define() -> Definer { Definer { - mutex: mutex::Mutex::build(), - hunk: Hunk::build(), + mutex: mutex::Mutex::define(), + hunk: Hunk::define(), } } } diff --git a/src/r3/src/sync/recursive_mutex.rs b/src/r3/src/sync/recursive_mutex.rs index a1cf73d1cc..3ec8aebaf1 100644 --- a/src/r3/src/sync/recursive_mutex.rs +++ b/src/r3/src/sync/recursive_mutex.rs @@ -196,10 +196,10 @@ where { /// Construct a `Definer` to define a mutex in [a configuration /// function](crate#static-configuration). - pub const fn build() -> Definer { + pub const fn define() -> Definer { Definer { - mutex: mutex::Mutex::build(), - hunk: Hunk::build(), + mutex: mutex::Mutex::define(), + hunk: Hunk::define(), } } } diff --git a/src/r3_kernel/src/cfg.rs b/src/r3_kernel/src/cfg.rs index 3992f75dac..a5143112e0 100644 --- a/src/r3_kernel/src/cfg.rs +++ b/src/r3_kernel/src/cfg.rs @@ -333,7 +333,7 @@ impl CfgBuilder { let size = (size + Traits::STACK_ALIGN - 1) / Traits::STACK_ALIGN * Traits::STACK_ALIGN; - let hunk = Hunk::build() + let hunk = Hunk::define() .len(size) .align(Traits::STACK_ALIGN) .finish(cfg); diff --git a/src/r3_port_arm/src/sp804/imp.rs b/src/r3_port_arm/src/sp804/imp.rs index 9b24e847a7..c96092a014 100644 --- a/src/r3_port_arm/src/sp804/imp.rs +++ b/src/r3_port_arm/src/sp804/imp.rs @@ -37,12 +37,12 @@ pub const fn configure(b: &mut Cfg) where C: ~const traits::CfgInterruptLine>, { - InterruptLine::build() + InterruptLine::define() .line(Traits::INTERRUPT_NUM) .priority(Traits::INTERRUPT_PRIORITY) .enabled(true) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(Traits::INTERRUPT_NUM) .start(handle_tick::) .finish(b); diff --git a/src/r3_port_arm_m/src/systick_tickful/imp.rs b/src/r3_port_arm_m/src/systick_tickful/imp.rs index 6685ebe104..0e7eef87be 100644 --- a/src/r3_port_arm_m/src/systick_tickful/imp.rs +++ b/src/r3_port_arm_m/src/systick_tickful/imp.rs @@ -41,11 +41,11 @@ pub const fn configure(b: &mut Cfg) where C: ~const traits::CfgBase> + ~const traits::CfgInterruptLine, { - InterruptLine::build() + InterruptLine::define() .line(INTERRUPT_SYSTICK) .priority(Traits::INTERRUPT_PRIORITY) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(INTERRUPT_SYSTICK) .start( #[inline] @@ -53,7 +53,7 @@ where ) .finish(b); - StartupHook::build() + StartupHook::define() .start( #[inline] |_| init(Traits::TICK_PERIOD), diff --git a/src/r3_port_arm_m_test_driver/src/board_rp2040.rs b/src/r3_port_arm_m_test_driver/src/board_rp2040.rs index 69dd2121cd..43026b925c 100644 --- a/src/r3_port_arm_m_test_driver/src/board_rp2040.rs +++ b/src/r3_port_arm_m_test_driver/src/board_rp2040.rs @@ -62,7 +62,7 @@ where C: ~const traits::CfgBase + ~const traits::CfgInterruptLine, C::System: traits::KernelInterruptLine, { - StartupHook::build() + StartupHook::define() .start(|_| { // Set the correct vector table address unsafe { diff --git a/src/r3_port_arm_m_test_driver/src/main.rs b/src/r3_port_arm_m_test_driver/src/main.rs index 1ab3a5d4fe..d3547c191f 100644 --- a/src/r3_port_arm_m_test_driver/src/main.rs +++ b/src/r3_port_arm_m_test_driver/src/main.rs @@ -141,7 +141,7 @@ macro_rules! instantiate_test { // Configure DWT for performance measurement #[cfg(feature = "kernel_benchmarks")] #[cfg(not(feature = "board-rp_pico"))] - StartupHook::::build().start(|_| { + StartupHook::::define().start(|_| { unsafe { let mut peripherals = cortex_m::peripheral::Peripherals::steal(); peripherals.DCB.enable_trace(); @@ -154,7 +154,7 @@ macro_rules! instantiate_test { // the first one as the print channel for the printing macros, and // the second one as log output #[cfg(feature = "output-rtt")] - StartupHook::build().start(|_| { + StartupHook::define().start(|_| { let channels = rtt_target::rtt_init! { up: { 0: { @@ -176,7 +176,7 @@ macro_rules! instantiate_test { // Redirect the log output to stderr #[cfg(feature = "output-semihosting")] - StartupHook::build().start(|_| { + StartupHook::define().start(|_| { logger_semihosting::init(); }).finish(b); diff --git a/src/r3_port_arm_test_driver/src/main.rs b/src/r3_port_arm_test_driver/src/main.rs index 7b620e48f4..530b156214 100644 --- a/src/r3_port_arm_test_driver/src/main.rs +++ b/src/r3_port_arm_test_driver/src/main.rs @@ -173,7 +173,7 @@ macro_rules! instantiate_test { // Start PMU cycle counter #[cfg(feature = "kernel_benchmarks")] - StartupHook::build().start(|_| { + StartupHook::define().start(|_| { use register::cpu::RegisterReadWrite; pmu::PMCR.modify(pmu::PMCR::E::SET + pmu::PMCR::D::DivideBy1); pmu::PMCNTENSET.modify(pmu::PMCNTENSET::C::SET); @@ -181,14 +181,14 @@ macro_rules! instantiate_test { // Redirect the log output to stderr #[cfg(all(feature = "output-semihosting", not(feature = "board-rza1")))] - StartupHook::build().start(|_| { + StartupHook::define().start(|_| { logger_semihosting::init(); }).finish(b); // Redirect the log output to UART because semihosting is really // slow on real hardware, which may prevent proper test execution #[cfg(feature = "board-rza1")] - StartupHook::build().start(|_| { + StartupHook::define().start(|_| { logger_rza1_uart::init(); }).finish(b); diff --git a/src/r3_port_riscv/src/plic/imp.rs b/src/r3_port_riscv/src/plic/imp.rs index 3adf0a3d80..d7780e93ed 100644 --- a/src/r3_port_riscv/src/plic/imp.rs +++ b/src/r3_port_riscv/src/plic/imp.rs @@ -13,7 +13,7 @@ pub const fn configure(b: &mut Cfg) where C: ~const traits::CfgInterruptLine>, { - InterruptHandler::build() + InterruptHandler::define() .line(INTERRUPT_EXTERNAL) .start(interrupt_handler::) .finish(b); diff --git a/src/r3_port_riscv/src/timer/imp.rs b/src/r3_port_riscv/src/timer/imp.rs index c5bfc31c73..bb2720619b 100644 --- a/src/r3_port_riscv/src/timer/imp.rs +++ b/src/r3_port_riscv/src/timer/imp.rs @@ -72,7 +72,7 @@ pub const fn configure(b: &mut Cfg) where C: ~const traits::CfgInterruptLine>, { - InterruptHandler::build() + InterruptHandler::define() .line(Traits::INTERRUPT_NUM) .start(handle_tick::) .finish(b); diff --git a/src/r3_port_riscv_test_driver/src/driver_kernel_tests/execute_lr_sc.rs b/src/r3_port_riscv_test_driver/src/driver_kernel_tests/execute_lr_sc.rs index a4286ec9b6..4c80499fe5 100644 --- a/src/r3_port_riscv_test_driver/src/driver_kernel_tests/execute_lr_sc.rs +++ b/src/r3_port_riscv_test_driver/src/driver_kernel_tests/execute_lr_sc.rs @@ -14,11 +14,11 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - StartupHook::build() + StartupHook::define() .start(startup_hook_body::) .finish(b); - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) diff --git a/src/r3_port_riscv_test_driver/src/interrupt_e310x.rs b/src/r3_port_riscv_test_driver/src/interrupt_e310x.rs index 720d9b8241..0f6662d081 100644 --- a/src/r3_port_riscv_test_driver/src/interrupt_e310x.rs +++ b/src/r3_port_riscv_test_driver/src/interrupt_e310x.rs @@ -167,14 +167,14 @@ where { // Automatically clear the interrupt line when an interrupt is taken unsafe { - InterruptHandler::build() + InterruptHandler::define() .line(INTERRUPT_GPIO0) .start(|_| clear_interrupt_line(INTERRUPT_GPIO0).unwrap()) .priority(i32::MIN) .unmanaged() .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(INTERRUPT_GPIO1) .start(|_| clear_interrupt_line(INTERRUPT_GPIO1).unwrap()) .priority(i32::MIN) diff --git a/src/r3_port_riscv_test_driver/src/main.rs b/src/r3_port_riscv_test_driver/src/main.rs index cc03893a78..627e209372 100644 --- a/src/r3_port_riscv_test_driver/src/main.rs +++ b/src/r3_port_riscv_test_driver/src/main.rs @@ -186,7 +186,7 @@ macro_rules! instantiate_test { const fn configure_app(b: &mut r3_kernel::Cfg) -> test_case::App { // Initialize the clock #[cfg(any(feature = "board-e310x-red-v", feature = "board-e310x-qemu"))] - StartupHook::build().start(|_| { + StartupHook::define().start(|_| { e310x::clocks(); }).finish(b); @@ -205,7 +205,7 @@ macro_rules! instantiate_test { // the first one as the print channel for the printing macros, and // the second one as log output #[cfg(feature = "output-rtt")] - StartupHook::build().start(|_| { + StartupHook::define().start(|_| { let channels = rtt_target::rtt_init! { up: { 0: { @@ -232,7 +232,7 @@ macro_rules! instantiate_test { // Redirect the log output to stderr #[cfg(feature = "output-uart")] - StartupHook::build().start(|_| { + StartupHook::define().start(|_| { logger_uart::init(); }).finish(b); diff --git a/src/r3_port_std/src/lib.md b/src/r3_port_std/src/lib.md index 31eb576db1..d6bc26c654 100644 --- a/src/r3_port_std/src/lib.md +++ b/src/r3_port_std/src/lib.md @@ -25,7 +25,7 @@ const fn configure_app(cfg: &mut Cfg) -> () where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task_body) .priority(1) .active(true) diff --git a/src/r3_port_std/tests/kernel_tests/external_interrupt.rs b/src/r3_port_std/tests/kernel_tests/external_interrupt.rs index 2145367b9f..cab2af565f 100644 --- a/src/r3_port_std/tests/kernel_tests/external_interrupt.rs +++ b/src/r3_port_std/tests/kernel_tests/external_interrupt.rs @@ -28,7 +28,7 @@ impl App> { + ~const traits::CfgInterruptLine + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task_body1::) .priority(1) .active(true) @@ -37,13 +37,13 @@ impl App> { let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(int_pri) .enabled(true) @@ -53,7 +53,7 @@ impl App> { None }; - let done = Hunk::<_, AtomicBool>::build().finish(b); + let done = Hunk::<_, AtomicBool>::define().finish(b); App { int, done } } diff --git a/src/r3_port_std/tests/kernel_tests/interrupt_table_sparsity.rs b/src/r3_port_std/tests/kernel_tests/interrupt_table_sparsity.rs index 7f79aa6622..51313edc5b 100644 --- a/src/r3_port_std/tests/kernel_tests/interrupt_table_sparsity.rs +++ b/src/r3_port_std/tests/kernel_tests/interrupt_table_sparsity.rs @@ -20,20 +20,22 @@ impl App> { where C: ~const traits::CfgBase> + ~const traits::CfgInterruptLine, { - StartupHook::build().start(hook_body::).finish(b); + StartupHook::define() + .start(hook_body::) + .finish(b); - InterruptLine::build().line(2).priority(64).finish(b); - InterruptLine::build().line(3).priority(64).finish(b); + InterruptLine::define().line(2).priority(64).finish(b); + InterruptLine::define().line(3).priority(64).finish(b); unsafe { - InterruptHandler::build().line(2).start(|_| {}).finish(b); - InterruptHandler::build().line(3).start(|_| {}).finish(b); - InterruptHandler::build() + InterruptHandler::define().line(2).start(|_| {}).finish(b); + InterruptHandler::define().line(3).start(|_| {}).finish(b); + InterruptHandler::define() .line(5) .unmanaged() .start(|_| {}) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(7) .unmanaged() .start(|_| {}) diff --git a/src/r3_port_std/tests/kernel_tests/stack_align.rs b/src/r3_port_std/tests/kernel_tests/stack_align.rs index 34726f7261..1b02c512b8 100644 --- a/src/r3_port_std/tests/kernel_tests/stack_align.rs +++ b/src/r3_port_std/tests/kernel_tests/stack_align.rs @@ -19,7 +19,7 @@ impl App> { where C: ~const traits::CfgBase> + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) diff --git a/src/r3_support_rp2040/src/usbstdio.rs b/src/r3_support_rp2040/src/usbstdio.rs index 423df02d76..a88c4a6b18 100644 --- a/src/r3_support_rp2040/src/usbstdio.rs +++ b/src/r3_support_rp2040/src/usbstdio.rs @@ -76,7 +76,7 @@ where C: ~const traits::CfgBase + ~const traits::CfgInterruptLine, C::System: traits::KernelInterruptLine, { - StartupHook::build() + StartupHook::define() .start(|_| { let p = unsafe { rp2040::Peripherals::steal() }; @@ -116,13 +116,13 @@ where let int_num = rp2040::Interrupt::USBCTRL_IRQ as InterruptNum + r3_port_arm_m::INTERRUPT_EXTERNAL0; - InterruptLine::build() + InterruptLine::define() .line(int_num) .priority(4) // meh .enabled(true) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_num) .start(|_| { poll::(); diff --git a/src/r3_support_rza1/src/os_timer/imp.rs b/src/r3_support_rza1/src/os_timer/imp.rs index 9c8bd8d410..4123bf4a5a 100644 --- a/src/r3_support_rza1/src/os_timer/imp.rs +++ b/src/r3_support_rza1/src/os_timer/imp.rs @@ -38,12 +38,12 @@ pub const fn configure(b: &mut Cfg) where C: ~const traits::CfgInterruptLine>, { - InterruptLine::build() + InterruptLine::define() .line(Traits::INTERRUPT_OSTM) .priority(Traits::INTERRUPT_OSTM_PRIORITY) .enabled(true) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(Traits::INTERRUPT_OSTM) .start(handle_tick::) .finish(b); diff --git a/src/r3_test_suite/src/kernel_benchmarks/mutex.rs b/src/r3_test_suite/src/kernel_benchmarks/mutex.rs index 1964b34a54..89021f87fa 100644 --- a/src/r3_test_suite/src/kernel_benchmarks/mutex.rs +++ b/src/r3_test_suite/src/kernel_benchmarks/mutex.rs @@ -45,12 +45,12 @@ impl AppInner) .priority(1) .finish(b); - let mtx = Mutex::build().protocol(Options::PROTOCOL).finish(b); + let mtx = Mutex::define().protocol(Options::PROTOCOL).finish(b); Self { task1, diff --git a/src/r3_test_suite/src/kernel_benchmarks/semaphore.rs b/src/r3_test_suite/src/kernel_benchmarks/semaphore.rs index 788587d801..9046b1890f 100644 --- a/src/r3_test_suite/src/kernel_benchmarks/semaphore.rs +++ b/src/r3_test_suite/src/kernel_benchmarks/semaphore.rs @@ -58,12 +58,12 @@ impl AppInner { + ~const traits::CfgTask + ~const traits::CfgSemaphore, { - let task1 = Task::build() + let task1 = Task::define() .start(task1_body::) .priority(1) .finish(b); - let sem = Semaphore::build().initial(1).maximum(1).finish(b); + let sem = Semaphore::define().initial(1).maximum(1).finish(b); Self { task1, sem } } diff --git a/src/r3_test_suite/src/kernel_benchmarks/task_lifecycle.rs b/src/r3_test_suite/src/kernel_benchmarks/task_lifecycle.rs index b44b2cbf9a..219924dd1d 100644 --- a/src/r3_test_suite/src/kernel_benchmarks/task_lifecycle.rs +++ b/src/r3_test_suite/src/kernel_benchmarks/task_lifecycle.rs @@ -47,12 +47,12 @@ impl AppInner { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - let task1 = Task::build() + let task1 = Task::define() .start(task1_body::) .priority(1) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(2) .finish(b); diff --git a/src/r3_test_suite/src/kernel_benchmarks/timer_start.rs b/src/r3_test_suite/src/kernel_benchmarks/timer_start.rs index aea80288e7..a6610225c3 100644 --- a/src/r3_test_suite/src/kernel_benchmarks/timer_start.rs +++ b/src/r3_test_suite/src/kernel_benchmarks/timer_start.rs @@ -45,7 +45,7 @@ impl AppInner { let mut i = 0; // FIXME: Work-around for `for` being unsupported in `const fn` while i < timers.len() { - timers[i] = MaybeUninit::new(Timer::build().start(|_| {}).finish(b)); + timers[i] = MaybeUninit::new(Timer::define().start(|_| {}).finish(b)); i += 1; } diff --git a/src/r3_test_suite/src/kernel_tests/basic.rs b/src/r3_test_suite/src/kernel_tests/basic.rs index d9711ac04e..3848179691 100644 --- a/src/r3_test_suite/src/kernel_tests/basic.rs +++ b/src/r3_test_suite/src/kernel_tests/basic.rs @@ -13,7 +13,7 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) diff --git a/src/r3_test_suite/src/kernel_tests/compute_atomics_round_robin.rs b/src/r3_test_suite/src/kernel_tests/compute_atomics_round_robin.rs index 780969cbc0..0505f461cc 100644 --- a/src/r3_test_suite/src/kernel_tests/compute_atomics_round_robin.rs +++ b/src/r3_test_suite/src/kernel_tests/compute_atomics_round_robin.rs @@ -130,7 +130,7 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgTimer, { - let timer = Timer::build() + let timer = Timer::define() .delay(Duration::from_millis(0)) .period(Duration::from_millis(10)) .start(timer_body::) @@ -143,7 +143,7 @@ impl App { let mut i = 0; while i < NUM_TASKS { tasks[i] = Some( - Task::build() + Task::define() .active(true) .start(worker_body::) .priority(2) @@ -156,12 +156,12 @@ impl App { // FIXME: Rewrite this with `<[_; 2]>::map` when it's compatible with `const fn` let tasks = [tasks[0].unwrap(), tasks[1].unwrap()]; - let judge_task = Task::build() + let judge_task = Task::define() .start(judge_task_body::) .priority(3) .finish(b); - let state = Hunk::<_, State>::build().finish(b); + let state = Hunk::<_, State>::define().finish(b); App { timer, diff --git a/src/r3_test_suite/src/kernel_tests/compute_round_robin.rs b/src/r3_test_suite/src/kernel_tests/compute_round_robin.rs index ef86067d96..a8856f69e2 100644 --- a/src/r3_test_suite/src/kernel_tests/compute_round_robin.rs +++ b/src/r3_test_suite/src/kernel_tests/compute_round_robin.rs @@ -46,9 +46,11 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgTimer, { - StartupHook::build().start(hook_body::).finish(b); + StartupHook::define() + .start(hook_body::) + .finish(b); - let timer = Timer::build() + let timer = Timer::define() .delay(Duration::from_millis(0)) .period(Duration::from_millis(10)) .start(timer_body::) @@ -61,7 +63,7 @@ impl App { let mut i = 0; while i < NUM_TASKS { tasks[i] = Some( - Task::build() + Task::define() .active(true) .start(worker_body::) .priority(3) @@ -74,7 +76,7 @@ impl App { // FIXME: Rewrite this with `<[_; 4]>::map` when it's compatible with `const fn` let tasks = [tasks[0].unwrap(), tasks[1].unwrap(), tasks[2].unwrap()]; - let state = Hunk::<_, State>::build().finish(b); + let state = Hunk::<_, State>::define().finish(b); App { timer, diff --git a/src/r3_test_suite/src/kernel_tests/cpu_lock.rs b/src/r3_test_suite/src/kernel_tests/cpu_lock.rs index f64c1aa456..91a08b3034 100644 --- a/src/r3_test_suite/src/kernel_tests/cpu_lock.rs +++ b/src/r3_test_suite/src/kernel_tests/cpu_lock.rs @@ -13,7 +13,7 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) diff --git a/src/r3_test_suite/src/kernel_tests/disabled.rs b/src/r3_test_suite/src/kernel_tests/disabled.rs index af156b8205..a1477dbad0 100644 --- a/src/r3_test_suite/src/kernel_tests/disabled.rs +++ b/src/r3_test_suite/src/kernel_tests/disabled.rs @@ -13,7 +13,7 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - StartupHook::build() + StartupHook::define() .start(|_| { log::warn!("some crate features are missing, skipping the test"); D::success(); diff --git a/src/r3_test_suite/src/kernel_tests/event_group_interrupt.rs b/src/r3_test_suite/src/kernel_tests/event_group_interrupt.rs index 7e610ecbb7..7915042dfb 100644 --- a/src/r3_test_suite/src/kernel_tests/event_group_interrupt.rs +++ b/src/r3_test_suite/src/kernel_tests/event_group_interrupt.rs @@ -41,19 +41,19 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgEventGroup, { - Task::build() + Task::define() .start(task0_body::) .priority(2) .active(true) .finish(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body::) .priority(1) .active(true) .finish(b); - let eg = EventGroup::build().queue_order(QueueOrder::Fifo).finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let eg = EventGroup::define().queue_order(QueueOrder::Fifo).finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { eg, task1, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/event_group_misc.rs b/src/r3_test_suite/src/kernel_tests/event_group_misc.rs index da9c5589bc..aa15fc549d 100644 --- a/src/r3_test_suite/src/kernel_tests/event_group_misc.rs +++ b/src/r3_test_suite/src/kernel_tests/event_group_misc.rs @@ -28,13 +28,13 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgEventGroup, { - Task::build() + Task::define() .start(task_body::) .priority(2) .active(true) .finish(b); - let eg1 = EventGroup::build().finish(b); - let eg2 = EventGroup::build().finish(b); + let eg1 = EventGroup::define().finish(b); + let eg2 = EventGroup::define().finish(b); App { eg1, eg2 } } diff --git a/src/r3_test_suite/src/kernel_tests/event_group_order_fifo.rs b/src/r3_test_suite/src/kernel_tests/event_group_order_fifo.rs index 9540377613..a8603fdd8d 100644 --- a/src/r3_test_suite/src/kernel_tests/event_group_order_fifo.rs +++ b/src/r3_test_suite/src/kernel_tests/event_group_order_fifo.rs @@ -42,30 +42,30 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgEventGroup, { - Task::build() + Task::define() .start(task0_body::) .priority(3) .active(true) .finish(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body::) .priority(1) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); - let task3 = Task::build() + let task3 = Task::define() .start(task3_body::) .priority(2) .finish(b); - let task4 = Task::build() + let task4 = Task::define() .start(task4_body::) .priority(2) .finish(b); - let eg = EventGroup::build().queue_order(QueueOrder::Fifo).finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let eg = EventGroup::define().queue_order(QueueOrder::Fifo).finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { eg, diff --git a/src/r3_test_suite/src/kernel_tests/event_group_order_task_priority.rs b/src/r3_test_suite/src/kernel_tests/event_group_order_task_priority.rs index 433ac83193..2672eb8215 100644 --- a/src/r3_test_suite/src/kernel_tests/event_group_order_task_priority.rs +++ b/src/r3_test_suite/src/kernel_tests/event_group_order_task_priority.rs @@ -38,32 +38,32 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgEventGroup, { - Task::build() + Task::define() .start(task0_body::) .priority(3) .active(true) .finish(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body::) .priority(1) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); - let task3 = Task::build() + let task3 = Task::define() .start(task3_body::) .priority(2) .finish(b); - let task4 = Task::build() + let task4 = Task::define() .start(task4_body::) .priority(2) .finish(b); - let eg = EventGroup::build() + let eg = EventGroup::define() .queue_order(QueueOrder::TaskPriority) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { eg, diff --git a/src/r3_test_suite/src/kernel_tests/event_group_poll.rs b/src/r3_test_suite/src/kernel_tests/event_group_poll.rs index 757593f48f..ebb141bcda 100644 --- a/src/r3_test_suite/src/kernel_tests/event_group_poll.rs +++ b/src/r3_test_suite/src/kernel_tests/event_group_poll.rs @@ -28,22 +28,22 @@ impl App { + ~const traits::CfgEventGroup + ~const traits::CfgInterruptLine, { - let eg = EventGroup::build().finish(b); + let eg = EventGroup::define().finish(b); - StartupHook::build() + StartupHook::define() .start(startup_hook::) .finish(b); let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .enabled(true) .priority(int_pri) diff --git a/src/r3_test_suite/src/kernel_tests/event_group_reorder_task_priority.rs b/src/r3_test_suite/src/kernel_tests/event_group_reorder_task_priority.rs index 249e3b11c7..6037c94363 100644 --- a/src/r3_test_suite/src/kernel_tests/event_group_reorder_task_priority.rs +++ b/src/r3_test_suite/src/kernel_tests/event_group_reorder_task_priority.rs @@ -46,32 +46,32 @@ impl App { { b.num_task_priority_levels(5); - Task::build() + Task::define() .start(task0_body::) .priority(4) .active(true) .finish(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body::) .priority(1) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(2) .finish(b); - let task3 = Task::build() + let task3 = Task::define() .start(task3_body::) .priority(1) .finish(b); - let task4 = Task::build() + let task4 = Task::define() .start(task4_body::) .priority(2) .finish(b); - let eg = EventGroup::build() + let eg = EventGroup::define() .queue_order(QueueOrder::TaskPriority) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { eg, diff --git a/src/r3_test_suite/src/kernel_tests/event_group_set_and_dispatch.rs b/src/r3_test_suite/src/kernel_tests/event_group_set_and_dispatch.rs index e5e83f791a..ecf222ce9a 100644 --- a/src/r3_test_suite/src/kernel_tests/event_group_set_and_dispatch.rs +++ b/src/r3_test_suite/src/kernel_tests/event_group_set_and_dispatch.rs @@ -28,29 +28,29 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgEventGroup, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - Task::build() + Task::define() .start(task2_body::) .priority(1) .active(true) .finish(b); - Task::build() + Task::define() .start(task3_body::) .priority(1) .active(true) .finish(b); - Task::build() + Task::define() .start(task4_body::) .priority(1) .active(true) .finish(b); - let eg = EventGroup::build().finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let eg = EventGroup::define().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { eg, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/event_group_timeout.rs b/src/r3_test_suite/src/kernel_tests/event_group_timeout.rs index 5bf3f9fbc3..fd1178fb86 100644 --- a/src/r3_test_suite/src/kernel_tests/event_group_timeout.rs +++ b/src/r3_test_suite/src/kernel_tests/event_group_timeout.rs @@ -45,19 +45,19 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgEventGroup, { - Task::build() + Task::define() .start(task0_body::) .priority(2) .active(true) .finish(b); - Task::build() + Task::define() .start(task1_body::) .priority(1) .active(true) .finish(b); - let eg = EventGroup::build().queue_order(QueueOrder::Fifo).finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let eg = EventGroup::define().queue_order(QueueOrder::Fifo).finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { eg, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/event_group_wait_types.rs b/src/r3_test_suite/src/kernel_tests/event_group_wait_types.rs index d26ca80030..266695f0c2 100644 --- a/src/r3_test_suite/src/kernel_tests/event_group_wait_types.rs +++ b/src/r3_test_suite/src/kernel_tests/event_group_wait_types.rs @@ -17,13 +17,13 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgEventGroup, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let eg = EventGroup::build().finish(b); + let eg = EventGroup::define().finish(b); App { eg } } diff --git a/src/r3_test_suite/src/kernel_tests/interrupt_disallowed_services.rs b/src/r3_test_suite/src/kernel_tests/interrupt_disallowed_services.rs index b066ebf52e..9a9e57e0aa 100644 --- a/src/r3_test_suite/src/kernel_tests/interrupt_disallowed_services.rs +++ b/src/r3_test_suite/src/kernel_tests/interrupt_disallowed_services.rs @@ -26,7 +26,7 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgInterruptLine, { - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) @@ -35,13 +35,13 @@ impl App { let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(int_pri) .enabled(true) diff --git a/src/r3_test_suite/src/kernel_tests/interrupt_during_boot.rs b/src/r3_test_suite/src/kernel_tests/interrupt_during_boot.rs index f5e6bd78c0..c31257157a 100644 --- a/src/r3_test_suite/src/kernel_tests/interrupt_during_boot.rs +++ b/src/r3_test_suite/src/kernel_tests/interrupt_during_boot.rs @@ -28,20 +28,20 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgInterruptLine, { - StartupHook::build() + StartupHook::define() .start(startup_hook::) .finish(b); let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(int_pri) .finish(b), @@ -50,7 +50,7 @@ impl App { None }; - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { int, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/interrupt_handler_priority.rs b/src/r3_test_suite/src/kernel_tests/interrupt_handler_priority.rs index 7655c31248..c1d5f537a9 100644 --- a/src/r3_test_suite/src/kernel_tests/interrupt_handler_priority.rs +++ b/src/r3_test_suite/src/kernel_tests/interrupt_handler_priority.rs @@ -28,7 +28,7 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgInterruptLine, { - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) @@ -37,61 +37,61 @@ impl App { let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(3) .priority(30) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(1) .priority(10) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(7) .priority(70) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(5) .priority(50) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(4) .priority(40) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(10) .priority(100) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(9) .priority(90) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(8) .priority(80) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(2) .priority(20) .finish(b); - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .param(6) @@ -99,7 +99,7 @@ impl App { .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(int_pri) .enabled(true) @@ -109,7 +109,7 @@ impl App { None }; - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { int, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/interrupt_misc.rs b/src/r3_test_suite/src/kernel_tests/interrupt_misc.rs index 683ea6a826..53b276f0d8 100644 --- a/src/r3_test_suite/src/kernel_tests/interrupt_misc.rs +++ b/src/r3_test_suite/src/kernel_tests/interrupt_misc.rs @@ -26,26 +26,26 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgInterruptLine, { - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) .finish(b); - StartupHook::build() + StartupHook::define() .start(startup_hook::) .finish(b); let int = if let [int_line, ..] = *D::INTERRUPT_LINES { unsafe { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .unmanaged() .finish(b); } - Some(InterruptLine::build().line(int_line).finish(b)) + Some(InterruptLine::define().line(int_line).finish(b)) } else { None }; diff --git a/src/r3_test_suite/src/kernel_tests/interrupt_priority.rs b/src/r3_test_suite/src/kernel_tests/interrupt_priority.rs index 5594c06065..4867ea4e76 100644 --- a/src/r3_test_suite/src/kernel_tests/interrupt_priority.rs +++ b/src/r3_test_suite/src/kernel_tests/interrupt_priority.rs @@ -29,7 +29,7 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgInterruptLine, { - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) @@ -40,12 +40,12 @@ impl App { if D::INTERRUPT_LINES.len() >= 1 && D::INTERRUPT_PRIORITIES.len() >= 1 { let int_line = D::INTERRUPT_LINES[0]; let pri = D::INTERRUPT_PRIORITIES[0]; - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr0::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(pri) .enabled(true) @@ -57,12 +57,12 @@ impl App { if D::INTERRUPT_LINES.len() >= 2 && D::INTERRUPT_PRIORITIES.len() >= 2 { let int_line = D::INTERRUPT_LINES[1]; let pri = D::INTERRUPT_PRIORITIES[1]; - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr1::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(pri) .enabled(true) @@ -73,7 +73,7 @@ impl App { }, ]; - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { int, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/interrupt_task_activate.rs b/src/r3_test_suite/src/kernel_tests/interrupt_task_activate.rs index ba4005dc8a..bc4dbce432 100644 --- a/src/r3_test_suite/src/kernel_tests/interrupt_task_activate.rs +++ b/src/r3_test_suite/src/kernel_tests/interrupt_task_activate.rs @@ -20,12 +20,12 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgInterruptLine, { - Task::build() + Task::define() .start(task_body1::) .priority(1) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task_body2::) .priority(0) .finish(b); @@ -33,13 +33,13 @@ impl App { let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(int_pri) .enabled(true) diff --git a/src/r3_test_suite/src/kernel_tests/interrupt_unmanaged.rs b/src/r3_test_suite/src/kernel_tests/interrupt_unmanaged.rs index ef1f2308b9..6bcc8a32c3 100644 --- a/src/r3_test_suite/src/kernel_tests/interrupt_unmanaged.rs +++ b/src/r3_test_suite/src/kernel_tests/interrupt_unmanaged.rs @@ -28,7 +28,7 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgInterruptLine, { - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) @@ -38,7 +38,7 @@ impl App { (D::INTERRUPT_LINES, D::UNMANAGED_INTERRUPT_PRIORITIES) { unsafe { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .unmanaged() .start(isr::) @@ -46,7 +46,7 @@ impl App { } Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(int_pri) .enabled(true) @@ -56,7 +56,7 @@ impl App { None }; - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { int, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/mutex_misc.rs b/src/r3_test_suite/src/kernel_tests/mutex_misc.rs index 3ef5cc14a0..01503b69bc 100644 --- a/src/r3_test_suite/src/kernel_tests/mutex_misc.rs +++ b/src/r3_test_suite/src/kernel_tests/mutex_misc.rs @@ -53,39 +53,41 @@ impl App { + ~const traits::CfgMutex + ~const traits::CfgInterruptLine, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(3) .finish(b); - let task3 = Task::build() + let task3 = Task::define() .start(task3_body::) .priority(2) .finish(b); let m = [ - Mutex::build().protocol(MutexProtocol::None).finish(b), - Mutex::build().protocol(MutexProtocol::Ceiling(1)).finish(b), - Mutex::build().finish(b), - Mutex::build().finish(b), + Mutex::define().protocol(MutexProtocol::None).finish(b), + Mutex::define() + .protocol(MutexProtocol::Ceiling(1)) + .finish(b), + Mutex::define().finish(b), + Mutex::define().finish(b), ]; let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .enabled(true) .priority(int_pri) @@ -95,7 +97,7 @@ impl App { None }; - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, diff --git a/src/r3_test_suite/src/kernel_tests/mutex_nesting.rs b/src/r3_test_suite/src/kernel_tests/mutex_nesting.rs index 5e70066261..d2371e7ff8 100644 --- a/src/r3_test_suite/src/kernel_tests/mutex_nesting.rs +++ b/src/r3_test_suite/src/kernel_tests/mutex_nesting.rs @@ -26,17 +26,25 @@ impl App { { b.num_task_priority_levels(16); - Task::build() + Task::define() .start(task1_body::) .priority(15) .active(true) .finish(b); let m = [ - Mutex::build().protocol(MutexProtocol::Ceiling(0)).finish(b), - Mutex::build().protocol(MutexProtocol::Ceiling(1)).finish(b), - Mutex::build().protocol(MutexProtocol::Ceiling(2)).finish(b), - Mutex::build().protocol(MutexProtocol::Ceiling(3)).finish(b), + Mutex::define() + .protocol(MutexProtocol::Ceiling(0)) + .finish(b), + Mutex::define() + .protocol(MutexProtocol::Ceiling(1)) + .finish(b), + Mutex::define() + .protocol(MutexProtocol::Ceiling(2)) + .finish(b), + Mutex::define() + .protocol(MutexProtocol::Ceiling(3)) + .finish(b), ]; App { m } diff --git a/src/r3_test_suite/src/kernel_tests/mutex_protect_priority_by_ceiling.rs b/src/r3_test_suite/src/kernel_tests/mutex_protect_priority_by_ceiling.rs index 2eda659b56..b13bc22e17 100644 --- a/src/r3_test_suite/src/kernel_tests/mutex_protect_priority_by_ceiling.rs +++ b/src/r3_test_suite/src/kernel_tests/mutex_protect_priority_by_ceiling.rs @@ -27,22 +27,24 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgMutex, { - let task0 = Task::build() + let task0 = Task::define() .start(task0_body::) .priority(0) .finish(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body::) .priority(1) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(2) .active(true) .finish(b); - let mtx = Mutex::build().protocol(MutexProtocol::Ceiling(0)).finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let mtx = Mutex::define() + .protocol(MutexProtocol::Ceiling(0)) + .finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task0, diff --git a/src/r3_test_suite/src/kernel_tests/mutex_timeout.rs b/src/r3_test_suite/src/kernel_tests/mutex_timeout.rs index 782adb3c18..e1307542a0 100644 --- a/src/r3_test_suite/src/kernel_tests/mutex_timeout.rs +++ b/src/r3_test_suite/src/kernel_tests/mutex_timeout.rs @@ -43,19 +43,19 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgMutex, { - Task::build() + Task::define() .start(task0_body::) .priority(2) .active(true) .finish(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body::) .priority(1) .active(false) .finish(b); - let eg = Mutex::build().finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let eg = Mutex::define().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task1, eg, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/mutex_unlock_and_dispatch.rs b/src/r3_test_suite/src/kernel_tests/mutex_unlock_and_dispatch.rs index 410208a1d4..7900a790cf 100644 --- a/src/r3_test_suite/src/kernel_tests/mutex_unlock_and_dispatch.rs +++ b/src/r3_test_suite/src/kernel_tests/mutex_unlock_and_dispatch.rs @@ -24,22 +24,22 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgMutex, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); - let task3 = Task::build() + let task3 = Task::define() .start(task3_body::) .priority(0) .finish(b); - let mtx = Mutex::build().finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let mtx = Mutex::define().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, diff --git a/src/r3_test_suite/src/kernel_tests/priority_boost.rs b/src/r3_test_suite/src/kernel_tests/priority_boost.rs index b4a8bdeb13..4c3687d1ab 100644 --- a/src/r3_test_suite/src/kernel_tests/priority_boost.rs +++ b/src/r3_test_suite/src/kernel_tests/priority_boost.rs @@ -23,7 +23,7 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) diff --git a/src/r3_test_suite/src/kernel_tests/semaphore_interrupt_handler.rs b/src/r3_test_suite/src/kernel_tests/semaphore_interrupt_handler.rs index 5401777625..1f79987be0 100644 --- a/src/r3_test_suite/src/kernel_tests/semaphore_interrupt_handler.rs +++ b/src/r3_test_suite/src/kernel_tests/semaphore_interrupt_handler.rs @@ -34,30 +34,30 @@ impl App { + ~const traits::CfgSemaphore + ~const traits::CfgInterruptLine, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - Task::build() + Task::define() .start(task2_body::) .priority(1) .active(true) .finish(b); - let sem = Semaphore::build().initial(0).maximum(2).finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let sem = Semaphore::define().initial(0).maximum(2).finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .enabled(true) .priority(int_pri) diff --git a/src/r3_test_suite/src/kernel_tests/semaphore_misc.rs b/src/r3_test_suite/src/kernel_tests/semaphore_misc.rs index d223ab3d05..e663e3b4e5 100644 --- a/src/r3_test_suite/src/kernel_tests/semaphore_misc.rs +++ b/src/r3_test_suite/src/kernel_tests/semaphore_misc.rs @@ -28,13 +28,13 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgSemaphore, { - Task::build() + Task::define() .start(task_body::) .priority(2) .active(true) .finish(b); - let eg1 = Semaphore::build().maximum(1).initial(1).finish(b); - let eg2 = Semaphore::build().maximum(2).initial(1).finish(b); + let eg1 = Semaphore::define().maximum(1).initial(1).finish(b); + let eg2 = Semaphore::define().maximum(2).initial(1).finish(b); App { eg1, eg2 } } diff --git a/src/r3_test_suite/src/kernel_tests/semaphore_signal_and_dispatch.rs b/src/r3_test_suite/src/kernel_tests/semaphore_signal_and_dispatch.rs index 3167ab1661..a2339fe456 100644 --- a/src/r3_test_suite/src/kernel_tests/semaphore_signal_and_dispatch.rs +++ b/src/r3_test_suite/src/kernel_tests/semaphore_signal_and_dispatch.rs @@ -25,24 +25,24 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgSemaphore, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - Task::build() + Task::define() .start(task2_body::) .priority(1) .active(true) .finish(b); - Task::build() + Task::define() .start(task3_body::) .priority(1) .active(true) .finish(b); - let sem = Semaphore::build().initial(0).maximum(2).finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let sem = Semaphore::define().initial(0).maximum(2).finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { sem, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/semaphore_timeout.rs b/src/r3_test_suite/src/kernel_tests/semaphore_timeout.rs index dbe0ef94a6..d8d9d97fa1 100644 --- a/src/r3_test_suite/src/kernel_tests/semaphore_timeout.rs +++ b/src/r3_test_suite/src/kernel_tests/semaphore_timeout.rs @@ -39,19 +39,19 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgSemaphore, { - Task::build() + Task::define() .start(task0_body::) .priority(2) .active(true) .finish(b); - Task::build() + Task::define() .start(task1_body::) .priority(1) .active(true) .finish(b); - let eg = Semaphore::build().initial(0).maximum(1).finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let eg = Semaphore::define().initial(0).maximum(1).finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { eg, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/startup_hook_disallowed_services.rs b/src/r3_test_suite/src/kernel_tests/startup_hook_disallowed_services.rs index 98cbe882f6..e2f2cfa4fe 100644 --- a/src/r3_test_suite/src/kernel_tests/startup_hook_disallowed_services.rs +++ b/src/r3_test_suite/src/kernel_tests/startup_hook_disallowed_services.rs @@ -23,7 +23,7 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - StartupHook::build().start(hook::).finish(b); + StartupHook::define().start(hook::).finish(b); App { _phantom: PhantomData, diff --git a/src/r3_test_suite/src/kernel_tests/startup_hook_pend_interrupt.rs b/src/r3_test_suite/src/kernel_tests/startup_hook_pend_interrupt.rs index 6a4852b68c..5cbb6ccc3b 100644 --- a/src/r3_test_suite/src/kernel_tests/startup_hook_pend_interrupt.rs +++ b/src/r3_test_suite/src/kernel_tests/startup_hook_pend_interrupt.rs @@ -89,9 +89,9 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgInterruptLine, { - StartupHook::build().start(hook::).finish(b); + StartupHook::define().start(hook::).finish(b); - let task = Task::build() + let task = Task::define() .start(task_body::) .priority(0) .finish(b); @@ -99,13 +99,13 @@ impl App { let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(int_pri) .enabled(true) @@ -115,7 +115,7 @@ impl App { None }; - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task, int, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/startup_hook_priority.rs b/src/r3_test_suite/src/kernel_tests/startup_hook_priority.rs index b5ad2f1426..094c3efde9 100644 --- a/src/r3_test_suite/src/kernel_tests/startup_hook_priority.rs +++ b/src/r3_test_suite/src/kernel_tests/startup_hook_priority.rs @@ -19,103 +19,103 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - StartupHook::build() + StartupHook::define() .start(hook::) .param(0) .priority(5) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(11) .priority(30) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(9) .priority(10) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(1) .priority(5) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(15) .priority(70) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(13) .priority(50) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(2) .priority(5) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(12) .priority(40) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(3) .priority(5) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(4) .priority(5) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(5) .priority(5) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(18) .priority(100) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(6) .priority(5) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(17) .priority(90) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(7) .priority(5) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(16) .priority(80) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(10) .priority(20) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(14) .priority(60) .finish(b); - StartupHook::build() + StartupHook::define() .start(hook::) .param(8) .priority(5) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { seq } } diff --git a/src/r3_test_suite/src/kernel_tests/sync_mutex_lock_and_dispatch.rs b/src/r3_test_suite/src/kernel_tests/sync_mutex_lock_and_dispatch.rs index 0821b98a2d..857d2cc438 100644 --- a/src/r3_test_suite/src/kernel_tests/sync_mutex_lock_and_dispatch.rs +++ b/src/r3_test_suite/src/kernel_tests/sync_mutex_lock_and_dispatch.rs @@ -25,20 +25,20 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgMutex, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .active(false) .finish(b); - let mutex = Mutex::build().finish(b); + let mutex = Mutex::define().finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, mutex, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/sync_mutex_misc.rs b/src/r3_test_suite/src/kernel_tests/sync_mutex_misc.rs index 17ff675734..cfa15a982f 100644 --- a/src/r3_test_suite/src/kernel_tests/sync_mutex_misc.rs +++ b/src/r3_test_suite/src/kernel_tests/sync_mutex_misc.rs @@ -37,24 +37,24 @@ impl App { + ~const traits::CfgInterruptLine + ~const traits::CfgMutex, { - Task::build() + Task::define() .start(task_body::) .priority(2) .active(true) .finish(b); - let eg1 = Mutex::build().finish(b); - let eg2 = Mutex::build().finish(b); + let eg1 = Mutex::define().finish(b); + let eg2 = Mutex::define().finish(b); let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .enabled(true) .priority(int_pri) @@ -64,7 +64,7 @@ impl App { None }; - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { eg1, eg2, int, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/sync_recursive_mutex_lock_and_dispatch.rs b/src/r3_test_suite/src/kernel_tests/sync_recursive_mutex_lock_and_dispatch.rs index c01c0fe94b..a47e732ecb 100644 --- a/src/r3_test_suite/src/kernel_tests/sync_recursive_mutex_lock_and_dispatch.rs +++ b/src/r3_test_suite/src/kernel_tests/sync_recursive_mutex_lock_and_dispatch.rs @@ -26,20 +26,20 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgMutex, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .active(false) .finish(b); - let mutex = RecursiveMutex::build().finish(b); + let mutex = RecursiveMutex::define().finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, mutex, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/sync_recursive_mutex_misc.rs b/src/r3_test_suite/src/kernel_tests/sync_recursive_mutex_misc.rs index 4924c34565..f0cf8974d7 100644 --- a/src/r3_test_suite/src/kernel_tests/sync_recursive_mutex_misc.rs +++ b/src/r3_test_suite/src/kernel_tests/sync_recursive_mutex_misc.rs @@ -38,24 +38,24 @@ impl App { + ~const traits::CfgInterruptLine + ~const traits::CfgMutex, { - Task::build() + Task::define() .start(task_body::) .priority(2) .active(true) .finish(b); - let eg1 = RecursiveMutex::build().finish(b); - let eg2 = RecursiveMutex::build().finish(b); + let eg1 = RecursiveMutex::define().finish(b); + let eg2 = RecursiveMutex::define().finish(b); let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .enabled(true) .priority(int_pri) @@ -65,7 +65,7 @@ impl App { None }; - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { eg1, eg2, int, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/task_activate_and_dispatch.rs b/src/r3_test_suite/src/kernel_tests/task_activate_and_dispatch.rs index 64d0037844..400d52534b 100644 --- a/src/r3_test_suite/src/kernel_tests/task_activate_and_dispatch.rs +++ b/src/r3_test_suite/src/kernel_tests/task_activate_and_dispatch.rs @@ -20,17 +20,17 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/task_activate_and_do_not_dispatch.rs b/src/r3_test_suite/src/kernel_tests/task_activate_and_do_not_dispatch.rs index 6fc58d67b2..d037d28fe3 100644 --- a/src/r3_test_suite/src/kernel_tests/task_activate_and_do_not_dispatch.rs +++ b/src/r3_test_suite/src/kernel_tests/task_activate_and_do_not_dispatch.rs @@ -20,17 +20,17 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(2) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/task_cpu_lock_reset.rs b/src/r3_test_suite/src/kernel_tests/task_cpu_lock_reset.rs index f1aee1f590..7a9ecf764c 100644 --- a/src/r3_test_suite/src/kernel_tests/task_cpu_lock_reset.rs +++ b/src/r3_test_suite/src/kernel_tests/task_cpu_lock_reset.rs @@ -15,12 +15,12 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); diff --git a/src/r3_test_suite/src/kernel_tests/task_misc.rs b/src/r3_test_suite/src/kernel_tests/task_misc.rs index 1a631525fd..507154de71 100644 --- a/src/r3_test_suite/src/kernel_tests/task_misc.rs +++ b/src/r3_test_suite/src/kernel_tests/task_misc.rs @@ -27,21 +27,21 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - StartupHook::build() + StartupHook::define() .start(startup_hook::) .finish(b); - let task1 = Task::build() + let task1 = Task::define() .start(task1_body::) .priority(2) .active(true) .param(42) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); - let task3 = Task::build() + let task3 = Task::define() .start(task3_body::) .priority(1) .finish(b); diff --git a/src/r3_test_suite/src/kernel_tests/task_park.rs b/src/r3_test_suite/src/kernel_tests/task_park.rs index 102069c4dd..0fb82d2c09 100644 --- a/src/r3_test_suite/src/kernel_tests/task_park.rs +++ b/src/r3_test_suite/src/kernel_tests/task_park.rs @@ -20,18 +20,18 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .active(true) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/task_park_priority_boost.rs b/src/r3_test_suite/src/kernel_tests/task_park_priority_boost.rs index 9f19cac5f2..f20da743dd 100644 --- a/src/r3_test_suite/src/kernel_tests/task_park_priority_boost.rs +++ b/src/r3_test_suite/src/kernel_tests/task_park_priority_boost.rs @@ -27,18 +27,18 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .active(true) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/task_park_reset.rs b/src/r3_test_suite/src/kernel_tests/task_park_reset.rs index 9e5861f095..b4009a1041 100644 --- a/src/r3_test_suite/src/kernel_tests/task_park_reset.rs +++ b/src/r3_test_suite/src/kernel_tests/task_park_reset.rs @@ -15,12 +15,12 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); diff --git a/src/r3_test_suite/src/kernel_tests/task_priority_boost_reset.rs b/src/r3_test_suite/src/kernel_tests/task_priority_boost_reset.rs index 63993e67dc..8fd5c67b80 100644 --- a/src/r3_test_suite/src/kernel_tests/task_priority_boost_reset.rs +++ b/src/r3_test_suite/src/kernel_tests/task_priority_boost_reset.rs @@ -16,12 +16,12 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); diff --git a/src/r3_test_suite/src/kernel_tests/task_priority_reset.rs b/src/r3_test_suite/src/kernel_tests/task_priority_reset.rs index 9f2ccf59bc..5f8e7b080d 100644 --- a/src/r3_test_suite/src/kernel_tests/task_priority_reset.rs +++ b/src/r3_test_suite/src/kernel_tests/task_priority_reset.rs @@ -26,18 +26,18 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(1) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(2) .active(true) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/task_queue_fifo.rs b/src/r3_test_suite/src/kernel_tests/task_queue_fifo.rs index cde2c5e4cf..7d8d4d5dc8 100644 --- a/src/r3_test_suite/src/kernel_tests/task_queue_fifo.rs +++ b/src/r3_test_suite/src/kernel_tests/task_queue_fifo.rs @@ -22,28 +22,28 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(2) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(2) .param(2) .finish(b); - let task3 = Task::build() + let task3 = Task::define() .start(task2_body::) .priority(2) .param(3) .finish(b); - let task4 = Task::build() + let task4 = Task::define() .start(task2_body::) .priority(2) .param(4) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, diff --git a/src/r3_test_suite/src/kernel_tests/task_set_priority.rs b/src/r3_test_suite/src/kernel_tests/task_set_priority.rs index 28db42dd29..9ca3230d32 100644 --- a/src/r3_test_suite/src/kernel_tests/task_set_priority.rs +++ b/src/r3_test_suite/src/kernel_tests/task_set_priority.rs @@ -26,18 +26,18 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(1) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(2) .active(true) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/task_take_interrupt_at_return.rs b/src/r3_test_suite/src/kernel_tests/task_take_interrupt_at_return.rs index 2f27f45a9f..5a0a121df5 100644 --- a/src/r3_test_suite/src/kernel_tests/task_take_interrupt_at_return.rs +++ b/src/r3_test_suite/src/kernel_tests/task_take_interrupt_at_return.rs @@ -118,7 +118,7 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgInterruptLine, { - let task = Task::build() + let task = Task::define() .start(task_body::) .priority(2) .active(true) @@ -127,13 +127,13 @@ impl App { let int = if let (&[int_line, ..], &[int_pri, ..]) = (D::INTERRUPT_LINES, D::INTERRUPT_PRIORITIES) { - InterruptHandler::build() + InterruptHandler::define() .line(int_line) .start(isr::) .finish(b); Some( - InterruptLine::build() + InterruptLine::define() .line(int_line) .priority(int_pri) .enabled(true) @@ -143,8 +143,8 @@ impl App { None }; - let seq = Hunk::<_, SeqTracker>::build().finish(b); - let state = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); + let state = Hunk::<_, SeqTracker>::define().finish(b); App { task, diff --git a/src/r3_test_suite/src/kernel_tests/time_adjust_event.rs b/src/r3_test_suite/src/kernel_tests/time_adjust_event.rs index 3acd075c5a..b7214114e6 100644 --- a/src/r3_test_suite/src/kernel_tests/time_adjust_event.rs +++ b/src/r3_test_suite/src/kernel_tests/time_adjust_event.rs @@ -42,21 +42,21 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(3) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); - let task3 = Task::build() + let task3 = Task::define() .start(task3_body::) .priority(2) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, task3, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/time_adjust_limits.rs b/src/r3_test_suite/src/kernel_tests/time_adjust_limits.rs index 659e44ad39..856a7bd5c4 100644 --- a/src/r3_test_suite/src/kernel_tests/time_adjust_limits.rs +++ b/src/r3_test_suite/src/kernel_tests/time_adjust_limits.rs @@ -38,17 +38,17 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(3) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/time_misc.rs b/src/r3_test_suite/src/kernel_tests/time_misc.rs index e8cf0f1384..335509a3c2 100644 --- a/src/r3_test_suite/src/kernel_tests/time_misc.rs +++ b/src/r3_test_suite/src/kernel_tests/time_misc.rs @@ -21,10 +21,10 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - StartupHook::build() + StartupHook::define() .start(startup_hook::) .finish(b); - Task::build() + Task::define() .start(task_body::) .priority(0) .active(true) diff --git a/src/r3_test_suite/src/kernel_tests/time_set_event.rs b/src/r3_test_suite/src/kernel_tests/time_set_event.rs index b3cbcd0e57..f3fb26899d 100644 --- a/src/r3_test_suite/src/kernel_tests/time_set_event.rs +++ b/src/r3_test_suite/src/kernel_tests/time_set_event.rs @@ -36,21 +36,21 @@ impl App { where C: ~const traits::CfgBase + ~const traits::CfgTask, { - Task::build() + Task::define() .start(task1_body::) .priority(3) .active(true) .finish(b); - let task2 = Task::build() + let task2 = Task::define() .start(task2_body::) .priority(1) .finish(b); - let task3 = Task::build() + let task3 = Task::define() .start(task3_body::) .priority(2) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { task2, task3, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/time_stress.rs b/src/r3_test_suite/src/kernel_tests/time_stress.rs index 1e91ae6564..4d3ee11da7 100644 --- a/src/r3_test_suite/src/kernel_tests/time_stress.rs +++ b/src/r3_test_suite/src/kernel_tests/time_stress.rs @@ -28,7 +28,7 @@ impl App { let mut i = 0; // FIXME: Work-around for `for` being unsupported in `const fn` while i < TASKS.len() { - Task::build() + Task::define() .start(task_body::) .param(i) .priority(0) @@ -37,13 +37,13 @@ impl App { i += 1; } - Task::build() + Task::define() .start(completion_task_body::) .priority(2) .active(true) .finish(b); - let done = EventGroup::build().finish(b); + let done = EventGroup::define().finish(b); App { done } } diff --git a/src/r3_test_suite/src/kernel_tests/timer_misc.rs b/src/r3_test_suite/src/kernel_tests/timer_misc.rs index 4bd066618d..16ad2235a0 100644 --- a/src/r3_test_suite/src/kernel_tests/timer_misc.rs +++ b/src/r3_test_suite/src/kernel_tests/timer_misc.rs @@ -48,38 +48,38 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgTimer, { - let timer1 = Timer::build() + let timer1 = Timer::define() .active(true) .delay(Duration::from_millis(200)) .start(timer1_body::) .param(42) .finish(b); - let timer2 = Timer::build() + let timer2 = Timer::define() .active(true) .delay(Duration::from_millis(100)) .start(timer2_body::) .param(52) .finish(b); - let timer3 = Timer::build() + let timer3 = Timer::define() .period(Duration::from_millis(0)) .start(unreachable_timer_body::) .finish(b); - let timer4 = Timer::build() + let timer4 = Timer::define() .delay(Duration::from_millis(0)) .period(Duration::from_millis(0)) .start(unreachable_timer_body::) .finish(b); - let task = Task::build() + let task = Task::define() .active(true) .start(task_body::) .priority(1) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { timer1, diff --git a/src/r3_test_suite/src/kernel_tests/timer_overdue.rs b/src/r3_test_suite/src/kernel_tests/timer_overdue.rs index b682021ccf..c1e45e3c2b 100644 --- a/src/r3_test_suite/src/kernel_tests/timer_overdue.rs +++ b/src/r3_test_suite/src/kernel_tests/timer_overdue.rs @@ -56,7 +56,7 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgTimer, { - let timer = Timer::build() + let timer = Timer::define() .delay(Duration::from_millis(400)) .period(Duration::from_millis(400)) .active(true) @@ -64,13 +64,13 @@ impl App { .param(42) .finish(b); - let task = Task::build() + let task = Task::define() .active(true) .start(task_body::) .priority(1) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { timer, task, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/timer_periodic.rs b/src/r3_test_suite/src/kernel_tests/timer_periodic.rs index aa5eb4f119..b2f14d2e19 100644 --- a/src/r3_test_suite/src/kernel_tests/timer_periodic.rs +++ b/src/r3_test_suite/src/kernel_tests/timer_periodic.rs @@ -44,20 +44,20 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgTimer, { - let timer = Timer::build() + let timer = Timer::define() .delay(Duration::from_millis(500)) .period(Duration::from_millis(300)) .start(timer_body::) .param(42) .finish(b); - let task = Task::build() + let task = Task::define() .active(true) .start(task_body::) .priority(1) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { timer, task, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/timer_stop.rs b/src/r3_test_suite/src/kernel_tests/timer_stop.rs index e273a14b38..1fb1863163 100644 --- a/src/r3_test_suite/src/kernel_tests/timer_stop.rs +++ b/src/r3_test_suite/src/kernel_tests/timer_stop.rs @@ -45,19 +45,19 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgTimer, { - let timer = Timer::build() + let timer = Timer::define() .active(true) .start(timer_body::) .param(42) .finish(b); - let task = Task::build() + let task = Task::define() .active(true) .start(task_body::) .priority(1) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { timer, task, seq } } diff --git a/src/r3_test_suite/src/kernel_tests/timer_zero_period.rs b/src/r3_test_suite/src/kernel_tests/timer_zero_period.rs index b27122e56b..24e6b67372 100644 --- a/src/r3_test_suite/src/kernel_tests/timer_zero_period.rs +++ b/src/r3_test_suite/src/kernel_tests/timer_zero_period.rs @@ -64,7 +64,7 @@ impl App { + ~const traits::CfgTask + ~const traits::CfgTimer, { - let timer = Timer::build() + let timer = Timer::define() .delay(Duration::from_millis(0)) .period(Duration::from_millis(0)) .active(true) @@ -72,13 +72,13 @@ impl App { .param(42) .finish(b); - let task = Task::build() + let task = Task::define() .active(true) .start(task_body::) .priority(1) .finish(b); - let seq = Hunk::<_, SeqTracker>::build().finish(b); + let seq = Hunk::<_, SeqTracker>::define().finish(b); App { timer, task, seq } } diff --git a/src/r3_test_suite/src/utils/benchmark.rs b/src/r3_test_suite/src/utils/benchmark.rs index b0fe0de45b..59cacd10ae 100644 --- a/src/r3_test_suite/src/utils/benchmark.rs +++ b/src/r3_test_suite/src/utils/benchmark.rs @@ -86,13 +86,13 @@ pub const fn configure + ~const raw_cfg::CfgTask, { - let task = Task::build() + let task = Task::define() .start(main_task::) .active(true) .priority(3) .finish(b); - let state = Hunk::::build().finish(b); + let state = Hunk::::define().finish(b); BencherCottage { task, state } }