File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,13 @@ class AsyncPlainLock
15
15
{
16
16
private:
17
17
SemaphoreHandle_t _lock;
18
- mutable void *_lockedBy;
19
18
20
19
public:
21
20
AsyncPlainLock () {
22
21
_lock = xSemaphoreCreateBinary ();
22
+ // In this fails, the system is likely that much out of memory that
23
+ // we should abort anyways. If assertions are disabled, nothing is lost..
24
+ assert (_lock);
23
25
xSemaphoreGive (_lock);
24
26
}
25
27
@@ -47,6 +49,9 @@ class AsyncWebLock
47
49
public:
48
50
AsyncWebLock () {
49
51
_lock = xSemaphoreCreateBinary ();
52
+ // In this fails, the system is likely that much out of memory that
53
+ // we should abort anyways. If assertions are disabled, nothing is lost..
54
+ assert (_lock);
50
55
_lockedBy = NULL ;
51
56
xSemaphoreGive (_lock);
52
57
}
You can’t perform that action at this time.
0 commit comments