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