-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An improper locking bug on the lock NewThread->StartMutex #167
Comments
Thanks Ryan! Technically you're right, things would be aesthetically balanced if we had a I'm tempted to leave things as-is. |
@evangreen Hi, thank you for your reply and confirm this! There is a similar case, the os/apps/libc/dynamic/pthread/pthread.c Lines 1219 to 1228 in 460ae51
|
Hm. It's a similar story there. The StartMutex acts like a barrier, ensuring that ClpThreadStart() doesn't let the thread run its main routine until pthread_create() has finished initializing the thread members. I suppose the StartMutex could be replaced with a pthread_cond_t, but the mutex is a little lighter. |
@evangreen OK, Thank you. Feel free to close this issue if they would be fixed. |
Hi, developers, thank you for your checking. It seems the lock
NewThread->StartMutex
is not released correctly when!KSUCCESS(KernelStatus)
?os/apps/libc/dynamic/pthread/pthread.c
Lines 248 to 278 in 460ae51
The text was updated successfully, but these errors were encountered: