提交 78207b6e 创建 作者: Silas Boyd-Wickizer's avatar Silas Boyd-Wickizer

Make lockname(s) a macro instead of a inline.

上级 c303d067
...@@ -15,11 +15,8 @@ struct spinlock { ...@@ -15,11 +15,8 @@ struct spinlock {
#endif #endif
}; };
static inline const char *lockname(struct spinlock *s)
{
#if SPINLOCK_DEBUG #if SPINLOCK_DEBUG
return s->name ?: "null"; #define lockname(s) ((s)->name ?: "null")
#else #else
return "unknown"; #define lockname(s) ("unknown")
#endif #endif
}
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论