From 5300fced15f40774f8fcf75904373541ea351efa Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 29 Dec 2008 08:58:17 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@553 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/Win32-MinGW/chconf.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'demos/Win32-MinGW/chconf.h') 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_ */ /** @} */ -- cgit v1.2.3