We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f8e679 commit ec19bf1Copy full SHA for ec19bf1
platform/SingletonPtr.h
@@ -43,6 +43,10 @@ extern osMutexId_t singleton_mutex_id;
43
inline static void singleton_lock(void)
44
{
45
#ifdef MBED_CONF_RTOS_PRESENT
46
+ if (!singleton_mutex_id) {
47
+ // RTOS has not booted yet so no mutex is needed
48
+ return;
49
+ }
50
osMutexAcquire(singleton_mutex_id, osWaitForever);
51
#endif
52
}
@@ -56,6 +60,10 @@ inline static void singleton_lock(void)
56
60
inline static void singleton_unlock(void)
57
61
58
62
63
64
65
66
59
67
osMutexRelease(singleton_mutex_id);
68
69
0 commit comments