Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-rtos by
rtos/rtos.h@118:6635230e06ba, 2016-07-25 (annotated)
- Committer:
- Kojto
- Date:
- Mon Jul 25 14:12:24 2016 +0100
- Revision:
- 118:6635230e06ba
- Parent:
- 8:88a1a9c26ae3
- Child:
- 120:4dc938e301cc
RTOS rev118
Compatible with the mbed library v122
Changes:
- warnings about duplicated CM symbols fix
- init sequence update - allows init array to be run prior kernel start
- RTOS with OS_TIMERS=0 fix for thread id
- Thread ctor is deprecated, use start() method
- main stack fix for IAR (set via linker script)
- add TCB context pointer
- provide thread safety for toolchains (std lib locks)
- add MBED_RTOS_SINGLE_THREAD macro (sets TSKCNT to 1 and TIMERS to 0)
- nrf51, nucleo l423kc, nucleo f767zi, nucleo f446ze, efm32 support addition
- add OSObserver function
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 8:88a1a9c26ae3 | 1 | /* mbed Microcontroller Library |
emilmont | 8:88a1a9c26ae3 | 2 | * Copyright (c) 2006-2012 ARM Limited |
emilmont | 8:88a1a9c26ae3 | 3 | * |
emilmont | 8:88a1a9c26ae3 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
emilmont | 8:88a1a9c26ae3 | 5 | * of this software and associated documentation files (the "Software"), to deal |
emilmont | 8:88a1a9c26ae3 | 6 | * in the Software without restriction, including without limitation the rights |
emilmont | 8:88a1a9c26ae3 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
emilmont | 8:88a1a9c26ae3 | 8 | * copies of the Software, and to permit persons to whom the Software is |
emilmont | 8:88a1a9c26ae3 | 9 | * furnished to do so, subject to the following conditions: |
emilmont | 8:88a1a9c26ae3 | 10 | * |
emilmont | 8:88a1a9c26ae3 | 11 | * The above copyright notice and this permission notice shall be included in |
emilmont | 8:88a1a9c26ae3 | 12 | * all copies or substantial portions of the Software. |
emilmont | 8:88a1a9c26ae3 | 13 | * |
emilmont | 8:88a1a9c26ae3 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
emilmont | 8:88a1a9c26ae3 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
emilmont | 8:88a1a9c26ae3 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
emilmont | 8:88a1a9c26ae3 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
emilmont | 8:88a1a9c26ae3 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
emilmont | 8:88a1a9c26ae3 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
emilmont | 8:88a1a9c26ae3 | 20 | * SOFTWARE. |
emilmont | 8:88a1a9c26ae3 | 21 | */ |
emilmont | 8:88a1a9c26ae3 | 22 | #ifndef RTOS_H |
emilmont | 8:88a1a9c26ae3 | 23 | #define RTOS_H |
emilmont | 8:88a1a9c26ae3 | 24 | |
emilmont | 8:88a1a9c26ae3 | 25 | #include "Thread.h" |
emilmont | 8:88a1a9c26ae3 | 26 | #include "Mutex.h" |
emilmont | 8:88a1a9c26ae3 | 27 | #include "RtosTimer.h" |
emilmont | 8:88a1a9c26ae3 | 28 | #include "Semaphore.h" |
emilmont | 8:88a1a9c26ae3 | 29 | #include "Mail.h" |
emilmont | 8:88a1a9c26ae3 | 30 | #include "MemoryPool.h" |
emilmont | 8:88a1a9c26ae3 | 31 | #include "Queue.h" |
emilmont | 8:88a1a9c26ae3 | 32 | |
emilmont | 8:88a1a9c26ae3 | 33 | using namespace rtos; |
emilmont | 8:88a1a9c26ae3 | 34 | |
Kojto | 118:6635230e06ba | 35 | /* Get mbed lib version number, as RTOS depends on mbed lib features |
Kojto | 118:6635230e06ba | 36 | like mbed_error, Callback and others. |
Kojto | 118:6635230e06ba | 37 | */ |
Kojto | 118:6635230e06ba | 38 | #include "mbed.h" |
Kojto | 118:6635230e06ba | 39 | |
Kojto | 118:6635230e06ba | 40 | #if (MBED_LIBRARY_VERSION < 122) |
Kojto | 118:6635230e06ba | 41 | #error "This version of RTOS requires mbed library version > 121" |
emilmont | 8:88a1a9c26ae3 | 42 | #endif |
Kojto | 118:6635230e06ba | 43 | |
Kojto | 118:6635230e06ba | 44 | #endif |