xv6-cs450/spinlock.h
rtm 8148b6ee53 i think my cmpxchg use was wrong in acquire
nesting cli/sti: release shouldn't always enable interrupts
separate setup of lapic from starting of other cpus, so cpu() works earlier
flag to disable locking in console output
make locks work even when curproc==0
(still crashes in clock interrupt)
2006-07-12 11:15:38 +00:00

7 lines
95 B
C

struct spinlock {
unsigned int locked;
unsigned who;
int count;
unsigned locker_pc;
};