提交 9e5219ae 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

null spinlock name bug

上级 33d26bc4
......@@ -27,14 +27,12 @@ void
acquire(struct spinlock *lk)
{
pushcli(); // disable interrupts to avoid deadlock.
if(holding(lk)) {
cprintf("lock: %s\n", lk->name);
if(holding(lk))
panic("acquire");
}
mtrace_lock_register(RET_EIP(),
lk,
lk->name,
lk->name ?: "null",
mtrace_lockop_acquire,
0);
......@@ -46,7 +44,7 @@ acquire(struct spinlock *lk)
mtrace_lock_register(RET_EIP(),
lk,
lk->name,
lk->name ?: "null",
mtrace_lockop_acquired,
0);
......@@ -66,7 +64,7 @@ release(struct spinlock *lk)
mtrace_lock_register(RET_EIP(),
lk,
lk->name,
lk->name ?: "null",
mtrace_lockop_release,
0);
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论