Files
2021-04-01 20:02:31 +08:00

14 lines
161 B
C

#include "os.h"
int spin_lock()
{
w_mstatus(r_mstatus() & ~MSTATUS_MIE);
return 0;
}
int spin_unlock()
{
w_mstatus(r_mstatus() | MSTATUS_MIE);
return 0;
}