diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-10-06 08:58:52 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-10-06 08:58:52 +0000 |
commit | d6d799ed48f8193bee286187132221f831726a07 (patch) | |
tree | 928f9db3dbb76cfdef92405635b8d1b7885e5b5e /src/include/threads.h | |
parent | ff4dd3f8f0f95652f754ab869b136d31d671ac51 (diff) | |
download | ChibiOS-d6d799ed48f8193bee286187132221f831726a07.tar.gz ChibiOS-d6d799ed48f8193bee286187132221f831726a07.tar.bz2 ChibiOS-d6d799ed48f8193bee286187132221f831726a07.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@39 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include/threads.h')
-rw-r--r-- | src/include/threads.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/include/threads.h b/src/include/threads.h index 12737de2e..2ed92fa39 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -186,10 +186,22 @@ static INLINE Thread *list_remove(ThreadsList *tlp) { /*
* Threads APIs.
*/
-Thread *chThdCreate(t_prio prio, t_tmode mode, void *workspace,
- t_size wsize, t_tfunc pf, void *arg);
-void chThdResume(Thread *tp);
-void chThdExit(t_msg msg);
+#ifdef __cplusplus
+extern "C" {
+#endif
+ Thread *chThdCreate(t_prio prio, t_tmode mode, void *workspace,
+ t_size wsize, t_tfunc pf, void *arg);
+ void chThdResume(Thread *tp);
+ void chThdExit(t_msg msg);
+#ifdef CH_USE_TERMINATE
+ void chThdTerminate(Thread *tp);
+#endif
+#ifdef CH_USE_WAITEXIT
+ t_msg chThdWait(Thread *tp);
+#endif
+#ifdef __cplusplus
+}
+#endif
/** Returns the pointer to the \p Thread currently in execution.*/
#define chThdSelf() currp
@@ -200,20 +212,11 @@ void chThdExit(t_msg msg); /** Verifies if the specified thread is in the \p PREXIT state.*/
#define chThdTerminated(tp) ((tp)->p_state == PREXIT)
-#ifdef CH_USE_TERMINATE
/**
* Verifies if the current thread has a termination request pending.
*/
#define chThdShouldTerminate() (currp->p_flags & P_TERMINATE)
-void chThdTerminate(Thread *tp);
-#endif
-
-#ifdef CH_USE_WAITEXIT
-t_msg chThdWait(Thread *tp);
-#endif
-
-#ifdef CH_USE_EXIT_EVENT
/**
* Returns the exit event source for the specified thread. The source is
* signaled when the thread terminates.
@@ -235,7 +238,6 @@ t_msg chThdWait(Thread *tp); * option is enabled in \p chconf.h.
*/
#define chThdGetExitEventSource(tp) (&(tp)->p_exitesource)
-#endif
#endif /* _THREADS_H_ */
|