Cleanup and improvements (#194)
- Lots of changes for migrating C code to C++ - Improved `Lockable` in several ways like adding `withLock()` (+ tests) - Improved `Semaphore` a bit for improved readability, and also added some tests - Upgrade Linux machine in GitHub Actions so that we can compile with a newer GCC - Simplification of WiFi connection - Updated funding options - (and more)
This commit is contained in:
committed by
GitHub
parent
1bb1260ea0
commit
6c67845645
@@ -39,24 +39,21 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
using Lockable::lock;
|
||||
|
||||
explicit Mutex(Type type = Type::Normal);
|
||||
~Mutex() override = default;
|
||||
~Mutex() final = default;
|
||||
|
||||
/** Attempt to lock the mutex. Blocks until timeout passes or lock is acquired.
|
||||
* @param[in] timeout
|
||||
* @return success result
|
||||
*/
|
||||
bool lock(TickType_t timeout) const override;
|
||||
|
||||
/** Attempt to lock the mutex. Blocks until lock is acquired, without timeout.
|
||||
* @return success result
|
||||
*/
|
||||
bool lock() const override { return lock(portMAX_DELAY); }
|
||||
bool lock(TickType_t timeout) const final;
|
||||
|
||||
/** Attempt to unlock the mutex.
|
||||
* @return success result
|
||||
*/
|
||||
bool unlock() const override;
|
||||
bool unlock() const final;
|
||||
|
||||
/** @return the owner of the thread */
|
||||
ThreadId getOwner() const;
|
||||
|
||||
Reference in New Issue
Block a user