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 NNN40_CLI by
Diff: mbed-events/EventLoop.cpp
- Revision:
- 25:1423b707b705
- Parent:
- 24:838a0b25934b
diff -r 838a0b25934b -r 1423b707b705 mbed-events/EventLoop.cpp
--- a/mbed-events/EventLoop.cpp Fri Nov 11 09:02:51 2016 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#ifdef MBED_CONF_RTOS_PRESENT
-#include "EventLoop.h"
-
-#include "events.h"
-#include "rtos.h"
-#include "mbed.h"
-
-
-EventLoop::EventLoop(
- osPriority priority,
- unsigned event_size,
- unsigned char *event_pointer,
- uint32_t stack_size,
- unsigned char *stack_pointer)
- : EventQueue(event_size, event_pointer)
- , _thread(priority, stack_size, stack_pointer)
- , _running(false) {
-}
-
-EventLoop::~EventLoop() {
- stop();
-}
-
-static void run(EventLoop *loop) {
- loop->dispatch();
-}
-
-osStatus EventLoop::start() {
- if (_running) {
- return osOK;
- }
-
- osStatus status = _thread.start(this, run);
- _running = (status == osOK);
- return status;
-}
-
-osStatus EventLoop::stop() {
- if (!_running) {
- return osOK;
- }
-
- break_();
- osStatus status = _thread.join();
- _running = false;
- return status;
-}
-
-#endif
-
