Skip to content
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

Replace env_init_counter with something like event group #16

Open
Hadatko opened this issue May 24, 2021 · 2 comments
Open

Replace env_init_counter with something like event group #16

Hadatko opened this issue May 24, 2021 · 2 comments

Comments

@Hadatko
Copy link
Contributor

Hadatko commented May 24, 2021

Hi @MichalPrincNXP, from what i see in code i would say that env_init_counter<0 is dead code and rest of code can be rewrtiten to bool logic. Recently i got a knowledge that for global bool knowledge should be used something like https://www.freertos.org/event-groups-API.html.

I may create PR with suggested code if you agree with me.
I am talking about rpmsg_env_freertos.c file.

@MichalPrincNXP
Copy link
Contributor

Sorry, I do not see the weakpoint, I guess using event group would consume a little more RAM. Anyway, your suggestions are welcome.

@Hadatko
Copy link
Contributor Author

Hadatko commented Sep 17, 2021

We were informed that good practice is to replace global bool variables with mutexes. Groups consumes less resources than mutexes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants