ww_mutex_unlock(&entry->obj->lock); /* 与mutex_unlock类似 */ if (res_obj) ww_mutex_unlock(&res_obj->lock); if (ret == -EDEADLK) { /* 在开始下一轮的加锁前,使用ww_mutex_lock_slow()获取上一轮有冲突的锁,ww_mutex_lock_slow()会一直休眠,直到该锁可用为止 */ /* we lost out...
ww_mutex_unlock(&entry->obj->lock); /* 与mutex_unlock类似 */ if (res_obj) ww_mutex_unlock(&res_obj->lock); if (ret == -EDEADLK) { /* 在开始下一轮的加锁前,使用ww_mutex_lock_slow()获取上一轮有冲突的锁,ww_mutex_lock_slow()会一直休眠,直到该锁可用为止 */ /* we lost out...
ww_mutex_lock_slow(&contended_entry->obj->lock, ctx); res_obj = contended_entry->obj; /* 跳转到下一轮的加锁操作 */ goto retry; } ww_acquire_fini(ctx); return ret; } void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx) { struct obj_entry *entry; list_for_eac...