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

RAII wrappers for mutex and critical section #9

Open
electretmike opened this issue Apr 4, 2023 · 1 comment
Open

RAII wrappers for mutex and critical section #9

electretmike opened this issue Apr 4, 2023 · 1 comment

Comments

@electretmike
Copy link
Contributor

It would be nice if there were RAII wrappers for mutex and ciritical section. Using them could look like:

{
  CiriticalSection cs;
  // Do things inside critical section
}

Same for a mutex:

{
  MutexLock lock(mutex);
  // Do things protected by mutex
}

Would something like that be in scope for this library?

@jonenz
Copy link
Owner

jonenz commented Jul 18, 2023

I would like to keep this out of the core part of the library since it doesn't directly interface with an existing FreeRTOS interface, but I'm open to adding it to the repo in a higher layer. Having a section of the library that implements some of these higher level C++ patterns/concepts would be very useful.

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