void unlock(Lock *l) { m->locks--; if(m->locks < 0) throw("lock count"); eventunlock(l); }
void runtime·unlock(Lock *l) { m->locks--; if(m->locks < 0) runtime·throw("lock count"); eventunlock(l); }
void notesleep(Note *n) { eventlock(&n->lock); eventunlock(&n->lock); // Let other sleepers find out too. }
void notewakeup(Note *n) { eventunlock(&n->lock); }
void runtime·notewakeup(Note *n) { eventunlock(&n->lock); }