aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chthreads.c3
-rw-r--r--src/include/threads.h4
-rw-r--r--src/lib/evtimer.h14
3 files changed, 10 insertions, 11 deletions
diff --git a/src/chthreads.c b/src/chthreads.c
index 14c507bb4..4b61fe964 100644
--- a/src/chthreads.c
+++ b/src/chthreads.c
@@ -48,9 +48,6 @@ Thread *init_thread(Thread *tp, tprio_t prio) {
#ifdef CH_USE_EVENTS
tp->p_epending = 0;
#endif
-#ifdef CH_USE_EXIT_EVENT
- chEvtInit(&tp->p_exitesource);
-#endif
THREAD_EXT_INIT(tp);
return tp;
}
diff --git a/src/include/threads.h b/src/include/threads.h
index b63636e63..4681a9caa 100644
--- a/src/include/threads.h
+++ b/src/include/threads.h
@@ -94,10 +94,6 @@ struct Thread {
/** The list of the threads waiting for this thread termination. */
Thread *p_waiting;
#endif
-#ifdef CH_USE_EXIT_EVENT
- /** The thread termination \p EventSource. */
- EventSource p_exitesource;
-#endif
#ifdef CH_USE_MESSAGES
ThreadsQueue p_msgqueue;
msg_t p_msg;
diff --git a/src/lib/evtimer.h b/src/lib/evtimer.h
index 7b2e01c6d..661b29cd4 100644
--- a/src/lib/evtimer.h
+++ b/src/lib/evtimer.h
@@ -27,7 +27,9 @@
#ifndef _EVTIMER_H_
#define _EVTIMER_H_
-
+/**
+ * Event timer structure.
+ */
typedef struct {
VirtualTimer et_vt;
EventSource et_es;
@@ -45,10 +47,14 @@ extern "C" {
/**
* Initializes an \p EvTimer structure.
+ * @param etp the EvTimer structure to be initialized
+ * @param time the interval in system ticks
*/
-#define evtInit(etp, i) (chEvtInit(&(etp)->et_es), \
- (etp)->et_vt.vt_func = NULL, \
- (etp)->et_interval = (i))
+#define evtInit(etp, time) { \
+ chEvtInit(&(etp)->et_es); \
+ (etp)->et_vt.vt_func = NULL; \
+ (etp)->et_interval = (time); \
+}
#endif /* _EVTIMER_H_ */