-
Notifications
You must be signed in to change notification settings - Fork 244
Fix timeout for Freertos semaphore. #251
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
Fix timeout for Freertos semaphore. #251
Conversation
It doesn't make sense to have portMaxDelay and then recalculate to lower value. Currently other ports are using simple implementation so i align with that. Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
Old PR is no more valid as it is in archived repository: #34 @MichalPrincNXP what do you think? Maybe we need talk about it more. |
We can also have other function which will count "us" based on OS. But i don't know if it will not be too much complicated, but OS like this would have possibility to use full scale timer. Maybe have two functions. get() (OS indenpendet) and getUs() /get in us/ |
@MichalPrincNXP this is not ready to merge. I cannot do it now. But i fixed Freertos. Sleep function is in us so i will do get too and i think i am doing nice compromise there. |
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
72f19a1
to
67a7cdd
Compare
@MichalPrincNXP now it should be aligned. Do you see any error in code? Most of them i cannot test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. The only thing I would change is the name of the get function parameter, it should stay clear that it deals with timeout, so my proposal is to change it to timeout_usecs. This parameter name should be also changed in erpc_threading_pthreads.cpp to have it unified. Thank you.
Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
Hi @MichalPrincNXP, is it ok now? |
Thanks, Dusan! |
It doesn't make sense to have portMaxDelay and then recalculate to lower value. Currently other ports are using simple implementation so i align with that.
Signed-off-by: Cervenka Dusan cervenka@acrios.com