Don't check EventDispatcher::thread_event_loop before using.

If static methods are getting called, variable is already set.
This commit is contained in:
Jared Boone 2016-06-24 15:27:23 -07:00
parent 9444d21c12
commit 2b7e763619

View File

@ -40,15 +40,11 @@ public:
void request_stop(); void request_stop();
static inline void events_flag(const eventmask_t events) { static inline void events_flag(const eventmask_t events) {
if( thread_event_loop ) { chEvtSignal(thread_event_loop, events);
chEvtSignal(thread_event_loop, events);
}
} }
static inline void events_flag_isr(const eventmask_t events) { static inline void events_flag_isr(const eventmask_t events) {
if( thread_event_loop ) { chEvtSignalI(thread_event_loop, events);
chEvtSignalI(thread_event_loop, events);
}
} }
private: private: