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

EvseManager Charger: simply locking #511

Merged
merged 5 commits into from
Jan 26, 2024

Conversation

corneliusclaussen
Copy link
Contributor

The Charger class in EvseManager had a quite complicated locking concept with two (recusive) mutexes. This PR simplies locking with a single mutex using only scoped locking. A few cases where locking was not neccessary were removed.

@corneliusclaussen corneliusclaussen force-pushed the refactor/EvseManager_remove_recursive_mutex branch from cf5896f to 990142e Compare January 25, 2024 15:54
Remove recursive mutexes, reduce scope that
needs locking.
Also adapting to newer EVerest coding style.

Signed-off-by: Cornelius Claussen <[email protected]>
@corneliusclaussen corneliusclaussen force-pushed the refactor/EvseManager_remove_recursive_mutex branch from 511f891 to e2d0458 Compare January 25, 2024 16:05
modules/EvseManager/EvseManager.cpp Outdated Show resolved Hide resolved
modules/EvseManager/EvseManager.cpp Outdated Show resolved Hide resolved
modules/EvseManager/EvseManager.cpp Outdated Show resolved Hide resolved
Signed-off-by: Cornelius Claussen <[email protected]>
@corneliusclaussen corneliusclaussen marked this pull request as draft January 25, 2024 21:12
Signed-off-by: Cornelius Claussen <[email protected]>
non recursive not possible with current
threading

Signed-off-by: Cornelius Claussen <[email protected]>
@corneliusclaussen corneliusclaussen marked this pull request as ready for review January 26, 2024 08:39
Co-authored-by: Kai Hermann <[email protected]>
Signed-off-by: corneliusclaussen <[email protected]>
@corneliusclaussen corneliusclaussen merged commit 4d2c6dc into main Jan 26, 2024
3 of 4 checks passed
@corneliusclaussen corneliusclaussen deleted the refactor/EvseManager_remove_recursive_mutex branch January 26, 2024 13:35
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

Successfully merging this pull request may close these issues.

2 participants