1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 00:35:06 +00:00

LibPthread: Mark the pthread_cond_t "waiting" flag as volatile

Oops, this is not gonna work if the compiler can optimize out all the
reads from this flag. :^)
This commit is contained in:
Andreas Kling 2019-12-07 15:34:00 +01:00
parent 96e8c8a4e5
commit e7dfd40dc3

View file

@ -388,7 +388,7 @@ int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param
}
struct WaitNode : public InlineLinkedListNode<WaitNode> {
bool waiting { true };
volatile bool waiting { true };
WaitNode* m_next { nullptr };
WaitNode* m_prev { nullptr };
};