Commit Graph

566 Commits (02936376ae5c3652823d2d63afae3a93e45cbc4d)

Author SHA1 Message Date
Russ Butler 793f9c566a Add partial thread safety to GCC
Add lock functions so that malloc and environment variable access are
thread safe.  Add the compiler option "-o thread-safe" to use the full
version of newlib which is thread safe.

Note that this patch does NOT make file access thread safe.
2016-05-31 16:16:59 -05:00
Russ Butler bd216c37cb Make the IAR standard library thread safe
Add the locks and flags necessary to make the IAR standard library
thread safe.  These changes consist of:
-Add compiler flag "--guard_calls" to ensure C++ function-static
    variables with dynamic initializers are initialized in a
    thread safe manner
-Add the linker flag "--threaded_lib" so the thread safe version of
    the standard library is used
-Implement mutex functions required for IAR thread safety
-Create a set of stub functions in retarget.c for when the rtos is not present
2016-05-31 14:41:21 -05:00
Steven Cooreman cc34a7bada Provide initial RTOS support for EFM32 targets 2016-05-30 14:14:36 +02:00
Neil Thiessen 0fd3721d2e [RTOS] Fixed online compiler macro warnings
Added an #ifndef directive to the __MBED_CMSIS_RTOS_CM and __CMSIS_RTOS macro definitions in order to prevent "Incompatible redefinition of macro" warnings from the online compiler.
2016-05-27 10:10:52 -06:00
geky 57bc433986 Fixed NULL usage on non-pointer member in thread
per @theotherjimmy
2016-05-26 16:24:32 -05:00
Christopher Haster 1ab7d73805 Added Thread::start and Thread::join for managing lifetime of threads
- Allows threads to started separately from when they are declared,
  avoiding the need to dynamically allocate threads at runtime.
- Allows multiple threads to join without forceful termination. Allowing
  threads to synchronize on cleanup.
2016-05-25 17:23:18 -05:00
0xc0170 327bd41632 Merge branch 'master' of https://github.com/neilt6/mbed into neilt6-master 2016-05-23 10:41:32 +01:00
0xc0170 daf5c9ee86 RTX - ARM7 init sequence update 2016-05-23 09:50:24 +01:00
0xc0170 607c9d119b RTX - ARMCC pre_main - pop fix 2016-05-23 09:50:16 +01:00
0xc0170 8420e13246 RTX - pre_main for GCC C function 2016-05-23 09:50:11 +01:00
Martin Kojtal 230be00443 ARMCC ulib - initalize RTOS before the standard library C++ init
Initialize the RTOS before initializing the standard library.  This
allows C++ constructors to be called in a well defined thread context.
2016-05-23 09:50:05 +01:00
Russ Butler 87176751a8 IAR - Initialize RTOS before standard library
Initialize the RTOS before initializing the standard library.  This
allows C++ constructors to be called in a well defined thread context.
2016-05-23 09:50:00 +01:00
Russ Butler a5ace8dea0 GCC - Initialize RTOS before standard library
Initialize the RTOS before initializing the standard library.  This
allows C++ constructors to be called in a well defined thread context.
2016-05-23 09:49:55 +01:00
Russ Butler ac727e270e ARMCC - Initialize RTOS before standard library
Initialize the RTOS before initializing the standard library.  This
allows C++ constructors to be called in a well defined thread context.
2016-05-23 09:49:48 +01:00
Russ Butler a0fd520408 Remove dead CodeSourcery init code
The CodeSourcery compiler is not longer supported.  This patch removes
the CodeSourcery init code in RTX_CM_lib.h.
2016-05-23 09:49:44 +01:00
Mihail Stoyanov d9734e5a32 Simplify layout:
* /libraries/mbed -> /hal
* /libraries/rtos -> /rtos
2016-05-23 09:13:59 +01:00