Westonci.ca is the premier destination for reliable answers to your questions, provided by a community of experts. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

Order violations occur assuming mThread is initially set to NULL; it is assumed that the following is true:
Thread 1::
void init() {
...
mThread = PR_CreateThread(mMain, ...);
...
}
Thread 2::
void mMain(...) {
...
mState = mThread->State;
...
}