Refactor CPU mutex code

This commit is contained in:
2023-10-22 19:30:42 +02:00
parent 02114ea7d8
commit 71f3fbc8b5
5 changed files with 23 additions and 23 deletions

View File

@@ -42,7 +42,7 @@ void exception_trigger(rv32_cpu_t* cpu, uint32_t scause, uint32_t tval)
cpu->pc = cpu->csr[CSR_STVEC] & 0xFFFFFFFC;
// Unlock cpu mutex, cpu_loop will lock it just after
pthread_mutex_unlock(&cpu0_mutex);
pthread_mutex_unlock(&cpu->mutex);
// cpu loop (attribute noreturn should erase previous stack)
cpu_loop(cpu);