From 70c86d43ec79032c7172507fc12bf7d78d44a3de Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 15 Oct 2007 14:52:56 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@53 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/include/delta.h | 3 +++ src/include/threads.h | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/delta.h b/src/include/delta.h index 1af774959..4365eb482 100644 --- a/src/include/delta.h +++ b/src/include/delta.h @@ -97,6 +97,9 @@ extern "C" { } #endif +/** Returns TRUE if the speciified timer is armed.*/ +#define chVTIsArmedI(vtp) ((vtp)->vt_func != NULL) + #endif /* CH_USE_VIRTUAL_TIMER */ #endif /* _DELTA_H_ */ diff --git a/src/include/threads.h b/src/include/threads.h index 0440b6007..3e1713d31 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -192,8 +192,10 @@ extern "C" { Thread *chThdCreate(t_prio prio, t_tmode mode, void *workspace, t_size wsize, t_tfunc pf, void *arg); void chThdSetPriority(t_prio newprio); - void chThdResume(Thread *tp); void chThdExit(t_msg msg); +#ifdef CH_USE_RESUME + void chThdResume(Thread *tp); +#endif #ifdef CH_USE_TERMINATE void chThdTerminate(Thread *tp); #endif @@ -240,6 +242,13 @@ extern "C" { */ #define chThdGetExitEventSource(tp) (&(tp)->p_exitesource) +/** + * Resumes a thread created with the \p P_SUSPENDED option or suspended with + * \p chThdSuspend(). + * @param tp the pointer to the thread + */ +#define chThdResumeI(tp) chSchReadyI(tp) + #endif /* _THREADS_H_ */ /** @} */ -- cgit v1.2.3