kernel/sleeplock.h
10 lines
1// Long-term locks for processes2struct sleeplock {3 uint locked; // Is the lock held?4 struct spinlock lk; // spinlock protecting this sleep lock5 6 // For debugging:7 char *name; // Name of lock.8 int pid; // Process holding lock9};1011