Remove spinlock contexts
All checks were successful
Build documentation / build-and-deploy (push) Successful in 28s

This commit is contained in:
2026-02-08 18:58:53 +01:00
parent 1ca3d11bac
commit 9e6035bd68
26 changed files with 161 additions and 262 deletions

View File

@@ -60,9 +60,7 @@ static void amd64_hpet_write32 (uint32_t reg, uint32_t value) {
static uint64_t amd64_hpet_read_counter (void) {
uint64_t value;
spin_lock_ctx_t ctxhrc;
spin_lock (&hpet_lock, &ctxhrc);
spin_lock (&hpet_lock);
if (!hpet_32bits)
value = amd64_hpet_read64 (HPET_MCVR);
@@ -77,15 +75,13 @@ static uint64_t amd64_hpet_read_counter (void) {
value = ((uint64_t)hi1 << 32) | lo;
}
spin_unlock (&hpet_lock, &ctxhrc);
spin_unlock (&hpet_lock);
return value;
}
static void amd64_hpet_write_counter (uint64_t value) {
spin_lock_ctx_t ctxhwc;
spin_lock (&hpet_lock, &ctxhwc);
spin_lock (&hpet_lock);
if (!hpet_32bits)
amd64_hpet_write64 (HPET_MCVR, value);
@@ -94,7 +90,7 @@ static void amd64_hpet_write_counter (uint64_t value) {
amd64_hpet_write32 (HPET_MCVR + 4, (uint32_t)(value >> 32));
}
spin_unlock (&hpet_lock, &ctxhwc);
spin_unlock (&hpet_lock);
}
/* Sleep for a given amount of microseconds. This time can last longer due to \ref hpet_lock being