ifdef __cplusplus spinlock and condvar constructors.

So scale-amd64 can build lwIP again..
上级 85628dc5
......@@ -6,6 +6,7 @@ struct condvar {
struct spinlock lock;
LIST_HEAD(waiters, proc) waiters;
#ifdef __cplusplus
// Create a condvar that will later be initialized by initcondvar.
// XXX(austin) Remove this and initcondvar.
constexpr condvar()
......@@ -14,4 +15,5 @@ struct condvar {
constexpr
condvar(const char *name)
: lock(name, LOCKSTAT_CONDVAR), waiters{} { }
#endif // __cplusplus
};
......@@ -21,6 +21,7 @@ struct spinlock {
struct klockstat *stat;
#endif
#ifdef __cplusplus
// Create a spinlock that will later be initialized by initlock.
// XXX(austin) Remove this and initlock in favor of the other ctor.
constexpr spinlock()
......@@ -44,6 +45,7 @@ struct spinlock {
, stat(lockstat ? nullptr : &klockstat_lazy)
#endif
{ }
#endif // __cplusplus
};
#if SPINLOCK_DEBUG
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论