This is a fork of the `events` subdirectory of https://github.com/ARMmbed/mbed-os
Dependents: HelloWorld_CCA01M1 HelloWorld_CCA02M1 CI-data-logger-server HelloWorld_CCA02M1 ... more
This is a fork of the events
subdirectory of https://github.com/ARMmbed/mbed-os.
Note, you must import this library with import name: events
!!!
mbed_events.h@9831:68f03f5d2dd2, 2017-05-30 (annotated)
- Committer:
- Kevin Bracey
- Date:
- Tue May 30 16:12:51 2017 +0300
- Revision:
- 9831:68f03f5d2dd2
- Parent:
- 5:705843a08e16
Add ability to request a shared event queue
To allow components with a simple need to schedule a few events to not
have to create their own threads, with all the associated memory
overhead, add 2 central calls to get shared normal and an
interrupt-deferral event queues, each dispatched on their own shared
threads.
For non-RTOS systems, just the normal event queue is provided, and the
application would have to dispatch this itself. This
application-dispatch is also available via a config option, to
potentially save memory by reusing the main thread.
Possible future improvement: the ability for separate components to
request a minimum stack size, and have the JSON combine these requests.
(Analogous tooling has already been mooted for mbed TLS config options
like key size).
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jimmy Brisson |
5:705843a08e16 | 1 | |
Jimmy Brisson |
5:705843a08e16 | 2 | /** \addtogroup events */ |
Jimmy Brisson |
5:705843a08e16 | 3 | /** @{*/ |
Bogdan Marinescu |
0:a792d4bf36c2 | 4 | /* events |
Bogdan Marinescu |
0:a792d4bf36c2 | 5 | * Copyright (c) 2016 ARM Limited |
Bogdan Marinescu |
0:a792d4bf36c2 | 6 | * |
Bogdan Marinescu |
0:a792d4bf36c2 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Bogdan Marinescu |
0:a792d4bf36c2 | 8 | * you may not use this file except in compliance with the License. |
Bogdan Marinescu |
0:a792d4bf36c2 | 9 | * You may obtain a copy of the License at |
Bogdan Marinescu |
0:a792d4bf36c2 | 10 | * |
Bogdan Marinescu |
0:a792d4bf36c2 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
Bogdan Marinescu |
0:a792d4bf36c2 | 12 | * |
Bogdan Marinescu |
0:a792d4bf36c2 | 13 | * Unless required by applicable law or agreed to in writing, software |
Bogdan Marinescu |
0:a792d4bf36c2 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
Bogdan Marinescu |
0:a792d4bf36c2 | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Bogdan Marinescu |
0:a792d4bf36c2 | 16 | * See the License for the specific language governing permissions and |
Bogdan Marinescu |
0:a792d4bf36c2 | 17 | * limitations under the License. |
Bogdan Marinescu |
0:a792d4bf36c2 | 18 | */ |
Bogdan Marinescu |
0:a792d4bf36c2 | 19 | #ifndef MBED_EVENTS_H |
Bogdan Marinescu |
0:a792d4bf36c2 | 20 | #define MBED_EVENTS_H |
Bogdan Marinescu |
0:a792d4bf36c2 | 21 | |
Bogdan Marinescu |
0:a792d4bf36c2 | 22 | |
Bogdan Marinescu |
0:a792d4bf36c2 | 23 | #include "equeue/equeue.h" |
Bogdan Marinescu |
0:a792d4bf36c2 | 24 | |
Bogdan Marinescu |
0:a792d4bf36c2 | 25 | |
Bogdan Marinescu |
0:a792d4bf36c2 | 26 | #ifdef __cplusplus |
Bogdan Marinescu |
0:a792d4bf36c2 | 27 | |
Sam Grove |
2:a60d8117d0e0 | 28 | #include "events/EventQueue.h" |
Sam Grove |
2:a60d8117d0e0 | 29 | #include "events/Event.h" |
Bogdan Marinescu |
0:a792d4bf36c2 | 30 | |
Kevin Bracey |
9831:68f03f5d2dd2 | 31 | #include "events/mbed_shared_queues.h" |
Kevin Bracey |
9831:68f03f5d2dd2 | 32 | |
Bogdan Marinescu |
0:a792d4bf36c2 | 33 | using namespace events; |
Bogdan Marinescu |
0:a792d4bf36c2 | 34 | |
Bogdan Marinescu |
0:a792d4bf36c2 | 35 | #endif |
Bogdan Marinescu |
0:a792d4bf36c2 | 36 | |
Bogdan Marinescu |
0:a792d4bf36c2 | 37 | |
Bogdan Marinescu |
0:a792d4bf36c2 | 38 | #endif |
Jimmy Brisson |
5:705843a08e16 | 39 | |
Jimmy Brisson |
5:705843a08e16 | 40 | /** @}*/ |