summaryrefslogtreecommitdiff
path: root/sys/kern/spinlock.c
blob: a35b8ce64cc496519e29e4de71c09d25f5d7746a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <spinlock.h>

void 
init_locklock(struct spinlock *l, const char *_name)
{
        l->name = _name;
        l->locked = 0;
        l->cpu = 0;
}

void 
acquire_lock(struct spinlock *l) 
{
       asm volatile("csrr sie, zero");
}