kernel/condition_variable: Make ConditionVariableEntry::Variable non-inline.

We have to use an atomic here.
This commit is contained in:
Augustin Cavalier 2022-02-07 14:22:39 -05:00
parent c9d521ea5b
commit 50157a8d17
2 changed files with 8 additions and 1 deletions

View File

@ -33,7 +33,7 @@ public:
status_t Wait(const void* object, uint32 flags = 0,
bigtime_t timeout = 0);
inline ConditionVariable* Variable() const { return fVariable; }
ConditionVariable* Variable() const;
private:
inline void _AddToLockedVariable(ConditionVariable* variable);

View File

@ -129,6 +129,13 @@ ConditionVariableEntry::Add(const void* object)
}
ConditionVariable*
ConditionVariableEntry::Variable() const
{
return atomic_pointer_get(&fVariable);
}
inline void
ConditionVariableEntry::_AddToLockedVariable(ConditionVariable* variable)
{