Browse Source

make htif_poweroff thread-safe (#211)

pull/216/head
Howard Mao 6 years ago
committed by GitHub
parent
commit
f7df78365f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      machine/htif.c

5
machine/htif.c

@ -109,8 +109,9 @@ void htif_console_putchar(uint8_t ch)
void htif_poweroff()
{
while (1) {
fromhost = 0;
tohost = 1;
spinlock_lock(&htif_lock);
__set_tohost(0, 0, 1);
spinlock_unlock(&htif_lock);
}
}

Loading…
Cancel
Save