-
Notifications
You must be signed in to change notification settings - Fork 967
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
Recursive mutex / newlib retarget lock support #276
Comments
ping @kilograham |
just for info ... look this results with <sys/lock.h> |
Not 100% sure what you are trying to indicate here... I know what a mutex does :-) ... FYI printf in the SDK is already mutex-ed for you by default. |
recursive mutex is used for "future" ..... <sys/lock.h> as baremetal and/or FreeRTOS to protect the stdio and file system |
So the existing mutex classes should not be used in a FreeRTOS as they are core not task focused (unless you specifically mean core). Equally, should a recursive mutex be successfully claimed by both application and IRQ on the same core? |
showing me that code doesn't really answer my question, though I am able to glean that you seem to want the recursive mutexes to work the way that makes them suitable for using in newlib locking (which isn't documented there). (edit i mean you showed me locks that are re-entrant on the same core, I still don't know if this is desirable behavior though for an IRQ to be able to take a lock owned by the application code). Can you point me at some docs for the newlib locking - since you seem to be implementing the locks defined somewhere, because fixing enabling newlib re-entrancy/locking when using multicore via the raw SDK is likely a good thing anyway (note I was assuming the newlib that comes with gcc just didn't support it, but I guess I am wrong). |
I was looking for documents for newlib and I applied this in reverse here is my version (as idea) |
Note recursive mutexes will be added by #378 |
...have been added... 🙂 (i.e. this can be closed?) |
yep close |
Please add support for recursive mutex
mutex_enter_blocking_recursive()
mutex_try_enter_recursive()
mutex_exit_recursive()
The text was updated successfully, but these errors were encountered: