Updated lock_release to update lock in objaddr list
This commit is contained in:
@ -66,6 +66,11 @@ impl ObjAddr {
|
||||
self.locks.get_mut(&id)
|
||||
}
|
||||
|
||||
/// Update lock at given id
|
||||
pub fn update_lock(&mut self, id: i32, lock: Lock) {
|
||||
self.locks.insert(id, lock);
|
||||
}
|
||||
|
||||
/// Searches for a lock of id **id** in self
|
||||
pub fn search_thread(&mut self, id: i32) -> Option<&Rc<RefCell<Thread>>> {
|
||||
self.threads.get(&id)
|
||||
|
Reference in New Issue
Block a user