small cleanuo to smp asm files

This commit is contained in:
2026-03-26 15:55:32 +01:00
parent 1aa9944581
commit 8a41f3e0fa
3 changed files with 7 additions and 20 deletions

View File

@@ -80,20 +80,15 @@ _tx_thread_schedule:
la t0, _tx_thread_execute_ptr // Pickup address of execute ptr
add t0, t0, t4 // Select this hart's execute slot
_tx_thread_schedule_loop:
csrci mstatus, 0x08 // Lockout interrupts
LOAD t1, 0(t0) // Pickup next thread to execute
bnez t1, _tx_thread_schedule_thread // If non-NULL, continue
csrsi mstatus, 0x08 // Enable interrupts
#ifdef TX_ENABLE_WFI
csrci mstatus, 0x08 // Lockout interrupts
LOAD t1, 0(t0) // Pickup next thread to execute
bnez t1, _tx_thread_schedule_thread // If non-NULL, continue
csrsi mstatus, 0x08 // Enable interrupts
wfi // Wait for interrupt
j _tx_thread_schedule_loop // Keep looking for a thread
#else
csrci mstatus, 0x08 // Lockout interrupts
LOAD t1, 0(t0) // Pickup next thread to execute
bnez t1, _tx_thread_schedule_thread // If non-NULL, continue
csrsi mstatus, 0x08 // Enable interrupts
j _tx_thread_schedule_loop // Keep looking for a thread
#endif
j _tx_thread_schedule_loop // Keep looking for a thread
_tx_thread_schedule_thread:
/* Atomically claim the thread's ready token so only one hart can