Commit Graph

29 Commits (7d5a17d9551ceeec1381de60e1a0a279c18ac930)

Author SHA1 Message Date
kegilbert f1abca35cf Change EventFlag timeout paramter
Matches rest of RTOS class timeout parameters by using the unit name. Remove ambigious statement in reference to 0 ms being no-timeout as a timeout of 0 causes the function to not block and return immediately (osWaitForever is used as no timeout as it will wait forever)
2019-02-20 17:52:28 -06:00
Martin Kojtal e1e20a64f9 rtos: fix coding style 2018-11-15 07:20:12 +00:00
Martin Kojtal e7acdc4cc8 rtos: fix astyle 2018-10-25 09:58:16 +01:00
Amanda Butler bbc6e5dee4
Edit Mutex.h
Make minor copy edits to existing text.
2018-10-12 11:11:20 -05:00
Aashish chaddha b993eb9d3d mutex doc changes 2018-10-12 10:51:38 -05:00
Aashish chaddha 24054ec723 improve mutex doc 2018-10-11 16:48:39 -05:00
Aashish chaddha 8786bfbb9a improve mutex doc 2018-10-11 16:33:56 -05:00
Przemyslaw Stekiel fba9c4bc57 Address review comments.
Perform the following changes:
- change definition of `void Mutex::lock(void)` to `osStatus Mutex::lock(void)`.
- change definition of `void Mutex::unlock()` to `osStatus Mutex::unlock()`.
- use MBED_ERROR1 macro to check the lock/unlock operation status.
- add notes in the description of lock/unlock functions: "This function asserts status of the lock/unlock operation (will not return in case of failure). Use of the return value is deprecated, as the return is expected to become void in the future.".
- modify/add description of the return value.
- remove reference to Mbed 6.
- make `lock(millisec)` deprecated in favour of lock(), trylock() and trylock_for() functions.
2018-09-03 07:40:01 +02:00
Przemyslaw Stekiel ac2db7cc06 Mutex: fixing missing include
Macro MBED_DEPRECATED_SINCE is defined in platform/mbed_toolchain.h which was not included.
If someone used member functions lock (which are prefixed with MBED_DEPRECATED_SINCE since some time), there would be a compile error instead of a warning.
Including mbed_toolchain.h fixes that.
2018-08-27 08:50:00 +02:00
Przemyslaw Stekiel c693eb512a Change `Mutex::unlock()` function definition - void return value
This is done for consistency with the new version of `Mutex::lock()` member function which does not return status.
2018-08-27 08:48:59 +02:00
Przemyslaw Stekiel b626e185ec `osStatus lock(uint32_t millisec=osWaitForever)` - remove default value
Since `void lock(void)` member function has been added we need to remove default value from deprecated `lock(uint32_t millisec=osWaitForever)` member function since otherwise calling `lock()` would be ambiguous.
2018-08-27 08:47:16 +02:00
Przemyslaw Stekiel ca8070a482 Fix for issue #6872 - Mutex lock has possibility to fail at runtime (returning status flag)
Add assertions for statuses returned by osMutexAcquire().
Add void Mutex::lock(void) member function - lock function which does not return status and waits for the mutex forever.
Make osStatus Mutex::lock(uint32_t millisec=osWaitForever) member function deprecated in favour of bool Mutex::trylock_for(uint32_t millisec).
2018-08-27 08:47:16 +02:00
Cruz Monrreal 07fce417ca
Merge pull request #5852 from maciejbocianski/scoped_lock
ScopedLock implementation
2018-02-06 12:51:21 -06:00
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
Amanda Butler 1d35ccecab
Copy edit Mutex.h
Copy edit document for active voice and consistent branding.
2018-01-17 16:56:32 -06:00
Maciej Bocianski cde5196170 rtos: Add ScopedMutexLock typedef 2018-01-15 09:34:34 +01:00
Amanda Butler 0d772db6ac
Copy edit Mutex.h
Copy edit file for active voice.
2018-01-08 17:46:08 -06:00
Bartek Szatkowski 71555a984d Add notes about ISR safety to RTOS doxygen 2017-12-27 14:46:49 +00:00
Martin Kojtal fbd9e7eaf2
Merge pull request #5372 from SenRamakri/sen_PlatformDoxygenUpdates
Doxygen comments fixes
2017-11-09 16:38:45 +00: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
Senthil Ramakrishnan 3ad298488c Doxygen comment updates and fixes 2017-10-26 15:36:26 -05:00
Bartek Szatkowski 0935683187 RTOS: Mutex: Improve API docs 2017-07-12 11:02:12 +01:00
Vincent Coubard 4d5f805cde rtos: Tag non value type as NonCopyable.
The types marked are: Mail, MemoryPool, Mutex, Queue, RtosTimer and Semaphore.
2017-06-20 16:23:44 +01: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
Jimmy Brisson f1a78027d3 Add tags to our code 2016-10-04 15:02:44 -05:00
Christopher Haster 2dd90bbe3c restructure - Restructured rtos directory 2016-09-30 19:18:09 -05:00