Skip to content

Commit f43e7b1

Browse files
author
David Saada
committed
NVStore: Calling thread wait doesn't depend on RTOS being defined any more.
1 parent 2b7766a commit f43e7b1

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

features/nvstore/source/nvstore.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
#include "FlashIAP.h"
2424
#include "mbed_critical.h"
2525
#include "mbed_assert.h"
26-
#ifdef MBED_CONF_RTOS_PRESENT
2726
#include "Thread.h"
28-
#endif
2927
#include <algorithm>
3028
#include <string.h>
3129
#include <stdio.h>
@@ -184,9 +182,7 @@ int NVStore::flash_write_area(uint8_t area, uint32_t offset, uint32_t size, cons
184182
if (!ret) {
185183
return ret;
186184
}
187-
#ifdef MBED_CONF_RTOS_PRESENT
188185
rtos::Thread::wait(1);
189-
#endif
190186
}
191187
return ret;
192188
}
@@ -201,9 +197,7 @@ int NVStore::flash_erase_area(uint8_t area)
201197
if (!ret) {
202198
return ret;
203199
}
204-
#ifdef MBED_CONF_RTOS_PRESENT
205200
rtos::Thread::wait(1);
206-
#endif
207201
}
208202
return ret;
209203
}
@@ -729,10 +723,8 @@ int NVStore::init()
729723
// wait until init is finished.
730724
init_attempts_val = core_util_atomic_incr_u32(&_init_attempts, 1);
731725
if (init_attempts_val != 1) {
732-
#ifdef MBED_CONF_RTOS_PRESENT
733726
while (!_init_done)
734727
rtos::Thread::wait(1);
735-
#endif
736728
return NVSTORE_SUCCESS;
737729
}
738730

0 commit comments

Comments
 (0)