[OS161] lock的实现(lock_create(), lock_destroy(), lock_acquire(), lock_release(), lock_do_i_hold())
目录1.在lock中我们要做什么2.spinlock和waitchannel是什么2.1spinlock(自旋锁)2.2waitchannel3.实现(1.semaphore2.waitchannel)3.1.lock_acquire3.2.lock_release3.3.lock_create3.4lock_destroy3.5.lock_do_i_hold1.在lock中我们要做什么简单地说,