Skip to content

Commit 93233c4

Browse files
author
Cruz Monrreal
authored
Merge pull request #7364 from 0xc0170/fix_storage_rtos
Fix storage rtos types - remove including internal header file
2 parents 9f27672 + dd33247 commit 93233c4

File tree

19 files changed

+52
-38
lines changed

19 files changed

+52
-38
lines changed

TESTS/mbed_hal/common_tickers/main.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121
#include "hal/us_ticker_api.h"
2222
#include "hal/lp_ticker_api.h"
2323

24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
#include "os_tick.h"
28+
#ifdef __cplusplus
29+
}
30+
#endif // __cplusplus
31+
2432
#if !DEVICE_USTICKER
2533
#error [NOT_SUPPORTED] test not supported
2634
#endif
@@ -118,7 +126,7 @@ void ticker_event_handler_stub(const ticker_data_t * const ticker)
118126
}
119127

120128
/* Indicate that ISR has been executed in interrupt context. */
121-
if (IsIrqMode()) {
129+
if (core_util_is_isr_active()) {
122130
intFlag++;
123131
}
124132
}

TESTS/mbed_hal/lp_ticker/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void overflow_protect()
6363
void ticker_event_handler_stub(const ticker_data_t * const ticker)
6464
{
6565
/* Indicate that ISR has been executed in interrupt context. */
66-
if (IsIrqMode()) {
66+
if (core_util_is_isr_active()) {
6767
intFlag++;
6868
}
6969

TESTS/mbedmicro-rtos-mbed/heap_and_stack/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ void test_heap_in_range(void)
182182
*/
183183
void test_main_stack_in_range(void)
184184
{
185-
os_thread_t *thread = (os_thread_t*) osThreadGetId();
185+
mbed_rtos_storage_thread_t *thread = (mbed_rtos_storage_thread_t *) osThreadGetId();
186186

187187
uint32_t psp = __get_PSP();
188188
uint8_t *stack_mem = (uint8_t*) thread->stack_mem;

features/device_key/source/DeviceKey.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include "mbed_wait_api.h"
2323
#include "stdlib.h"
2424

25+
#include <string.h>
26+
2527
#if !defined(MBEDTLS_CMAC_C)
2628
#error [NOT_SUPPORTED] MBEDTLS_CMAC_C needs to be enabled for this driver
2729
#else

features/lwipstack/LWIPStack.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,20 @@ class LWIP : public OnboardNetworkStack, private mbed::NonCopyable<LWIP> {
141141
void *hw; /**< alternative implementation pointer - used for PPP */
142142
};
143143

144-
os_semaphore_t linked_sem;
144+
mbed_rtos_storage_semaphore_t linked_sem;
145145
osSemaphoreId_t linked;
146-
os_semaphore_t unlinked_sem;
146+
mbed_rtos_storage_semaphore_t unlinked_sem;
147147
osSemaphoreId_t unlinked;
148-
os_semaphore_t has_any_addr_sem;
148+
mbed_rtos_storage_semaphore_t has_any_addr_sem;
149149
osSemaphoreId_t has_any_addr;
150150
#define HAS_ANY_ADDR 1
151151
#if PREF_ADDR_TIMEOUT
152-
os_semaphore_t has_pref_addr_sem;
152+
mbed_rtos_storage_semaphore_t has_pref_addr_sem;
153153
osSemaphoreId_t has_pref_addr;
154154
#define HAS_PREF_ADDR 2
155155
#endif
156156
#if BOTH_ADDR_TIMEOUT
157-
os_semaphore_t has_both_addr_sem;
157+
mbed_rtos_storage_semaphore_t has_both_addr_sem;
158158
osSemaphoreId_t has_both_addr;
159159
#define HAS_BOTH_ADDR 4
160160
#endif

features/lwipstack/lwip-sys/arch/sys_arch.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include "lwip/opt.h"
2222
#include "mbed_rtos_storage.h"
2323

24+
#include <stdbool.h>
25+
2426
extern u8_t lwip_ram_heap[];
2527

2628
#if NO_SYS == 0

features/netsocket/emac-drivers/TARGET_Freescale_EMAC/kinetis_emac.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ Kinetis_EMAC::Kinetis_EMAC() : xTXDCountSem(ENET_TX_RING_LEN, ENET_TX_RING_LEN),
8080
{
8181
}
8282

83-
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, os_thread_t *thread_cb)
83+
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, mbed_rtos_storage_thread_t *thread_cb)
8484
{
8585
osThreadAttr_t attr = {0};
8686
attr.name = threadName;
8787
attr.stack_mem = malloc(stacksize);
8888
attr.cb_mem = thread_cb;
8989
attr.stack_size = stacksize;
90-
attr.cb_size = sizeof(os_thread_t);
90+
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
9191
attr.priority = priority;
9292
return osThreadNew(thread, arg, &attr);
9393
}

features/netsocket/emac-drivers/TARGET_Freescale_EMAC/kinetis_emac.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class Kinetis_EMAC : public EMAC {
149149
void phy_task();
150150
static void ethernet_callback(ENET_Type *base, enet_handle_t *handle, enet_event_t event, void *param);
151151

152-
os_thread_t thread_cb;
152+
mbed_rtos_storage_thread_t thread_cb;
153153
osThreadId_t thread; /**< Processing thread */
154154
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
155155
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */

features/netsocket/emac-drivers/TARGET_NUVOTON_EMAC/numaker_emac.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ NUMAKER_EMAC::NUMAKER_EMAC() : thread(0), hwaddr()
5858
{
5959
}
6060

61-
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, os_thread_t *thread_cb)
61+
static osThreadId_t create_new_thread(const char *threadName, void (*thread)(void *arg), void *arg, int stacksize, osPriority_t priority, mbed_rtos_storage_thread_t *thread_cb)
6262
{
6363
osThreadAttr_t attr = {0};
6464
attr.name = threadName;
6565
attr.stack_mem = malloc(stacksize);
6666
attr.cb_mem = thread_cb;
6767
attr.stack_size = stacksize;
68-
attr.cb_size = sizeof(os_thread_t);
68+
attr.cb_size = sizeof(mbed_rtos_storage_thread_t);
6969
attr.priority = priority;
7070
return osThreadNew(thread, arg, &attr);
7171
}

features/netsocket/emac-drivers/TARGET_NUVOTON_EMAC/numaker_emac.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class NUMAKER_EMAC : public EMAC {
146146
void phy_task();
147147
static void ethernet_callback(char event, void *param);
148148

149-
os_thread_t thread_cb;
149+
mbed_rtos_storage_thread_t thread_cb;
150150
osThreadId_t thread; /**< Processing thread */
151151
rtos::Mutex TXLockMutex;/**< TX critical section mutex */
152152
rtos::Semaphore xTXDCountSem; /**< TX free buffer counting semaphore */

0 commit comments

Comments
 (0)