-
Notifications
You must be signed in to change notification settings - Fork 2k
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
stdio: remove superfluous mutex_lock in init #3859
Conversation
NACK. IMHO this adds runtime overhead to a very often used functionality - just so debugging for some core module works... |
agreed... |
So, we need a printk? |
btw. I assume that accessing the UART slow things down much more than checking a single value. |
I say no. All you can not debug using printf is mutexes and the peripheral UART driver. So introduce printk just for debugging mutexes? No... |
@OlegHahm move the mutex_lock below uart_init? |
@kaspar030, seems legit. Was probably too late yesterday to see the simple solution. |
looks better :-) |
@OlegHahm would you mind adding a short explanation to the commit? |
@kaspar030, additional to "Otherwise one cannot enable debugging for mutexes."? |
needs rebase |
7c58f51
to
32f07da
Compare
rebased and squashed |
Wait a minute. With the new ringbuffer, the mutex_lock() call is not needed anymore. We can drop it completely. Would you mind changing the PR accordingly? edit I mean, just the call within uart_stdio_init(). |
So, just dropping the mutex_lock() in init? |
I don't have a board at hand, but if you could do a quick test and this doesn't break in a completly unforseen way, ACK. |
2ee9fa9
to
7b186a4
Compare
rebased |
Would you mind changing the commit & PR descriptions? They don't reflect what's going on anymore. Other than that, ACK. |
...since the introduction of the new ringbuffer.
7b186a4
to
ee8aae7
Compare
Can't deny that. Updated. |
Nice. Go! |
stdio: remove superfluous mutex_lock in init
Stumbled across this while trying to debug mutexes - which are used inside this module...