We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
HI, https://github.com/PikoRT/pikoRT/blob/master/kernel/mutex.c#L14
int sys_pthread_mutex_lock(kernel_mutex_t *mutex) { mutex->val++; if (!mutex->val) return 0;
I'm pretty sure such code is not mutual exclusion. It better to implement cmpxchg by ldrex or ldxr
cmpxchg
ldrex
ldxr
Also, the tests for mutext_* are not test for mutual exclusion at all, they only test for the functions finish execution or not.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
HI,
https://github.com/PikoRT/pikoRT/blob/master/kernel/mutex.c#L14
I'm pretty sure such code is not mutual exclusion.
It better to implement
cmpxchg
byldrex
orldxr
Also, the tests for mutext_* are not test for mutual exclusion at all, they only test for the functions finish execution or not.
The text was updated successfully, but these errors were encountered: