aboutsummaryrefslogtreecommitdiffstats
path: root/demos/Win32-MinGW/chconf.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-12-29 08:58:17 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-12-29 08:58:17 +0000
commit5300fced15f40774f8fcf75904373541ea351efa (patch)
treeb827e1e605bfed623163bf18d64ab08d0e1bd5c6 /demos/Win32-MinGW/chconf.h
parentb1e4025ebd651cc922e3fcfb0706a7b8c7cabeba (diff)
downloadChibiOS-5300fced15f40774f8fcf75904373541ea351efa.tar.gz
ChibiOS-5300fced15f40774f8fcf75904373541ea351efa.tar.bz2
ChibiOS-5300fced15f40774f8fcf75904373541ea351efa.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@553 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/Win32-MinGW/chconf.h')
-rw-r--r--demos/Win32-MinGW/chconf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h
index 3187998cc..5b487dbe7 100644
--- a/demos/Win32-MinGW/chconf.h
+++ b/demos/Win32-MinGW/chconf.h
@@ -172,20 +172,26 @@
#define THREAD_EXT_FIELDS \
struct { \
/* Add thread custom fields here.*/ \
+ /* The thread termination \p EventSource.*/ \
+ EventSource p_exitesource; \
};
/** User initialization code added to the \p chThdCreate() API.
* @note It is invoked from within \p chThdInit(). */
#define THREAD_EXT_INIT(tp) { \
/* Add thread initialization code here.*/ \
+ chEvtInit(&tp->p_exitesource); \
}
/** User finalization code added to the \p chThdExit() API.
* @note It is inserted into lock zone. */
#define THREAD_EXT_EXIT(tp) { \
/* Add thread finalization code here.*/ \
+ chEvtBroadcastI(&currp->p_exitesource); \
}
+#define chThdGetExitEventSource(tp) (&(tp)->p_exitesource)
+
#endif /* _CHCONF_H_ */
/** @} */