Commit Graph

9 Commits (ae033da12f923e5f8cbfa568e1f9d1dac0eac92e)

Author SHA1 Message Date
Kevin Bracey cd573a603f Add Mutex::trylock_until and trylock_for
Given the 64-bit timebase, add trylock_until to Mutex.

Naming is based on a combination of Mutex::trylock, Thread::wait_until,
and C++11 timed_mutex::try_lock_until.

pthreads and C11 use "timedlock", but that's not a good fit against our
existing trylock() and lock(timeout) - they have only absolute-time
waits, not relative.

To increase the similarity to C++11, add trylock_for - same parameters
as lock, but with the bool return value of trylock and trylock_until.

Add an assertion when convering status codes to booleans to check that
there are no non-timeout errors.
2018-01-29 15:26:41 +02:00
Martin Kojtal c45dd269f5
Merge pull request #3648 from c1728p9/condition_variable
Add ConditionVariable to mbed rtos
2017-11-09 16:38:02 +00:00
Kevin Bracey 130fffaf8b Shrink RTOS classes
Various RTOS classes were storing their CMSIS-RTOS creation attribute
structure as a member, when it's not required after construction. Reduce
memory by eliminating this member.
2017-11-03 15:22:22 +02:00
Russ Butler 0c4e50abb3 Add ConditionVariable to mbed rtos
Add the ConditionVariable class to mbed rtos to provide easier and
safer synchronization.
2017-11-02 21:02:27 -05:00
Russ Butler 96bd943ea2 RTX5: Enable priority inheritance and robust mode
Add the attribute flash to enable priority inheritance and robust mode.
The robust flag allows mutexes held by terminated threads to be
properly released.
2017-06-02 23:50:36 -05:00
Bartek Szatkowski 0064df1ce6 Add name parameter for C++ mutex wrapper 2017-05-30 18:55:55 +01:00
Bartek Szatkowski b793a3fb89 Update codebase for CMSIS5/RTX5
Update all of mbed-os to use RTX5.
2017-05-30 18:55:52 +01:00
Sam Grove 301b77c4b2 For drivers, events, hal, platform, rtos and mbed.h add one level of path to make sure specific and unique includes files are found. 2016-10-01 02:11:36 -05:00
Christopher Haster 2dd90bbe3c restructure - Restructured rtos directory 2016-09-30 19:18:09 -05:00