Skip to content

Commit e48e599

Browse files
committed
Fix RTOS function prototypes by adding extern "C"
Wrap the file mbed_rtos_storage.h in extern "C". This allows the functions inside rtx_lib.h to have correct definitions when included in a C++ file. This is required for the RTX5 error trapping.
1 parent b44e6f8 commit e48e599

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

rtos/mbed_rtos_storage.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#ifndef MBED_RTOS_STORAGE_H
2323
#define MBED_RTOS_STORAGE_H
2424

25+
#ifdef __cplusplus
26+
extern "C" {
27+
#endif
28+
2529
/** \addtogroup rtos */
2630
/** @{*/
2731

@@ -47,6 +51,10 @@ typedef os_event_flags_t mbed_rtos_storage_event_flags_t;
4751
typedef os_message_t mbed_rtos_storage_message_t;
4852
typedef os_timer_t mbed_rtos_storage_timer_t;
4953

54+
#ifdef __cplusplus
55+
}
56+
#endif
57+
5058
#endif
5159

5260
/** @}*/

0 commit comments

Comments
 (0)