Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard.

Dependents:   denki-yohou_b TestY201 Network-RTOS NTPClient_HelloWorld ... more

Deprecated

This is the mbed 2 rtos library. mbed OS 5 integrates the mbed library with mbed-rtos. With this, we have provided thread safety for all mbed APIs. If you'd like to learn about using mbed OS 5, please see the docs.

Committer:
<>
Date:
Thu Sep 01 15:13:42 2016 +0100
Revision:
121:3da5f554d8bf
Parent:
118:6635230e06ba
Child:
123:58563e6cba1e
RTOS rev121

Compatible with the mbed library v125

Changes:
- K64F: Revert to hardcoded stack pointer in RTX.
- Adding NCS36510 support.
- Add MAX32620 target support.
- Fix implicit declaration of function 'atexit'.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 118:6635230e06ba 1 /*----------------------------------------------------------------------------
Kojto 118:6635230e06ba 2 * CMSIS-RTOS - RTX
Kojto 118:6635230e06ba 3 *----------------------------------------------------------------------------
Kojto 118:6635230e06ba 4 * Name: os_events.h
Kojto 118:6635230e06ba 5 * Purpose: OS Event Callbacks for CMSIS RTOS
Kojto 118:6635230e06ba 6 * Rev.: VX.XX
Kojto 118:6635230e06ba 7 *----------------------------------------------------------------------------
Kojto 118:6635230e06ba 8 *
Kojto 118:6635230e06ba 9 * Copyright (c) 1999-2009 KEIL, 2009-2016 ARM Germany GmbH
Kojto 118:6635230e06ba 10 * All rights reserved.
Kojto 118:6635230e06ba 11 * Redistribution and use in source and binary forms, with or without
Kojto 118:6635230e06ba 12 * modification, are permitted provided that the following conditions are met:
Kojto 118:6635230e06ba 13 * - Redistributions of source code must retain the above copyright
Kojto 118:6635230e06ba 14 * notice, this list of conditions and the following disclaimer.
Kojto 118:6635230e06ba 15 * - Redistributions in binary form must reproduce the above copyright
Kojto 118:6635230e06ba 16 * notice, this list of conditions and the following disclaimer in the
Kojto 118:6635230e06ba 17 * documentation and/or other materials provided with the distribution.
Kojto 118:6635230e06ba 18 * - Neither the name of ARM nor the names of its contributors may be used
Kojto 118:6635230e06ba 19 * to endorse or promote products derived from this software without
Kojto 118:6635230e06ba 20 * specific prior written permission.
Kojto 118:6635230e06ba 21 *
Kojto 118:6635230e06ba 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 118:6635230e06ba 23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 118:6635230e06ba 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Kojto 118:6635230e06ba 25 * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
Kojto 118:6635230e06ba 26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
Kojto 118:6635230e06ba 27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
Kojto 118:6635230e06ba 28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
Kojto 118:6635230e06ba 29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
Kojto 118:6635230e06ba 30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
Kojto 118:6635230e06ba 31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Kojto 118:6635230e06ba 32 * POSSIBILITY OF SUCH DAMAGE.
Kojto 118:6635230e06ba 33 *---------------------------------------------------------------------------*/
Kojto 118:6635230e06ba 34 #ifndef _RT_OS_EVENT_OBSERVER_H
Kojto 118:6635230e06ba 35 #define _RT_OS_EVENT_OBSERVER_H
Kojto 118:6635230e06ba 36
Kojto 118:6635230e06ba 37 #include <stdint.h>
Kojto 118:6635230e06ba 38
Kojto 118:6635230e06ba 39 #ifdef __cplusplus
Kojto 118:6635230e06ba 40 extern "C" {
Kojto 118:6635230e06ba 41 #endif
Kojto 118:6635230e06ba 42
Kojto 118:6635230e06ba 43 typedef struct {
Kojto 118:6635230e06ba 44 uint32_t version;
Kojto 118:6635230e06ba 45 void (*pre_start)(void);
Kojto 118:6635230e06ba 46 void *(*thread_create)(int thread_id, void *context);
Kojto 118:6635230e06ba 47 void (*thread_destroy)(void *context);
Kojto 118:6635230e06ba 48 void (*thread_switch)(void *context);
Kojto 118:6635230e06ba 49 } OsEventObserver;
Kojto 118:6635230e06ba 50 extern const OsEventObserver *osEventObs;
Kojto 118:6635230e06ba 51
Kojto 118:6635230e06ba 52 void osRegisterForOsEvents(const OsEventObserver *observer);
Kojto 118:6635230e06ba 53
Kojto 118:6635230e06ba 54 #ifdef __cplusplus
Kojto 118:6635230e06ba 55 };
Kojto 118:6635230e06ba 56 #endif
Kojto 118:6635230e06ba 57
Kojto 118:6635230e06ba 58 #endif