From 3e9765e2069a9faedff2721a1abf46607cf1189d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 28 Dec 2008 10:07:46 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@545 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chthreads.c | 38 -------------------------------------- src/include/threads.h | 42 ------------------------------------------ src/templates/chconf.h | 12 ++---------- 3 files changed, 2 insertions(+), 90 deletions(-) (limited to 'src') diff --git a/src/chthreads.c b/src/chthreads.c index a1c8a7b4e..14c507bb4 100644 --- a/src/chthreads.c +++ b/src/chthreads.c @@ -181,39 +181,6 @@ Thread *chThdCreateFromMemoryPool(MemoryPool *mp, tprio_t prio, } #endif /* defined(CH_USE_DYNAMIC) && defined(CH_USE_WAITEXIT) && defined(CH_USE_MEMPOOLS) */ -/** - * Creates a new thread. - * @param prio the priority level for the new thread. Usually the threads are - * created with priority \p NORMALPRIO, priorities - * can range from \p LOWPRIO to \p HIGHPRIO. - * @param mode the creation option flags for the thread. The following options - * can be OR'ed in this parameter:
- * - * @param workspace pointer to a working area dedicated to the thread stack - * @param wsize size of the working area. - * @param pf the thread function - * @param arg an argument passed to the thread function. It can be \p NULL. - * @return The pointer to the \p Thread structure allocated for the - * thread into the working space area. - * @note A thread can terminate by calling \p chThdExit() or by simply - * returning from its main function. - * @deprecated Please use \p chThdCreateStatic() or \p chThdInit() instead, - * this function will be removed in version 1.0.0. - */ -Thread *chThdCreate(tprio_t prio, tmode_t mode, void *workspace, - size_t wsize, tfunc_t pf, void *arg) { - - Thread *tp = chThdInit(workspace, wsize, prio, pf, arg); - if (mode & P_SUSPENDED) - return tp; - return chThdResume(tp); -} - /** * Changes the running thread priority, reschedules if necessary. * @@ -324,13 +291,8 @@ void chThdExit(msg_t msg) { tp->p_exitcode = msg; THREAD_EXT_EXIT(tp); #ifdef CH_USE_WAITEXIT -// while (notempty(&tp->p_waiting)) -// chSchReadyI(list_remove(&tp->p_waiting)); if (tp->p_waiting != NULL) chSchReadyI(tp->p_waiting); -#endif -#ifdef CH_USE_EXIT_EVENT - chEvtBroadcastI(&tp->p_exitesource); #endif chSchGoSleepS(PREXIT); } diff --git a/src/include/threads.h b/src/include/threads.h index c58ddc76a..5b26a6535 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -216,30 +216,6 @@ extern "C" { */ #define chThdShouldTerminate() (currp->p_flags & P_TERMINATE) -/** - * Returns the exit event source for the specified thread. The source is - * signaled when the thread terminates. - * @param tp the pointer to the thread - * @note When registering on a thread termination make sure the thread - * is still alive, if you do that after the thread termination - * then you would miss the event. There are two ways to ensure - * this:
- * - * @note You dont need to unregister from a terminated thread because - * the event source becomes inactive. - * @note The function is available only if the \p CH_USE_EXIT_EVENT - * option is enabled in \p chconf.h. - * @deprecated \p THREAD_EXT_EXIT should be used, this functionality will be - * removed in version 1.0.0. - */ -#define chThdGetExitEventSource(tp) (&(tp)->p_exitesource) - /** * Resumes a thread created with the \p P_SUSPENDED option or suspended with * \p chThdSuspend(). @@ -247,24 +223,6 @@ extern "C" { */ #define chThdResumeI(tp) chSchReadyI(tp) -/** - * Creates a new thread, simplified variant. - * @param prio the priority level for the new thread. Usually the threads are - * created with priority \p NORMALPRIO, priorities - * can range from \p LOWPRIO to \p HIGHPRIO. - * @param workspace pointer to a working area dedicated to the thread stack - * @param wsize size of the working area. - * @param pf the thread function - * @return the pointer to the \p Thread structure allocated for the - * thread into the working space area. - * @note A thread can terminate by calling \p chThdExit() or by simply - * returning from its main function. - * @deprecated Please use \p chThdCreateStatic() or \p chThdInit() instead, - * this function will be removed in version 1.0.0. - */ -#define chThdCreateFast(prio, workspace, wsize, pf) \ - chThdCreateStatic(workspace, wsize, prio, pf, NULL) - /** * Suspends the invoking thread for the specified time. * @param time the delay in system ticks diff --git a/src/templates/chconf.h b/src/templates/chconf.h index d59801291..05289b098 100644 --- a/src/templates/chconf.h +++ b/src/templates/chconf.h @@ -89,19 +89,11 @@ * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_EVENT -/** Configuration option: If enabled then the threads have an option to serve - * messages by priority instead of FIFO order. +/** Configuration option: If enabled then the threads serve messages by + * priority instead of FIFO order. * @note requires \p CH_USE_MESSAGES.*/ #define CH_USE_MESSAGES_PRIORITY -/** Configuration option: if specified then the - * \p chThdGetExitEventSource() function is included in the kernel. - * @note requires \p CH_USE_EVENTS. - * @deprecated \p THREAD_EXT_EXIT should be used, this functionality will be - * removed in version 1.0.0. - */ -#define CH_USE_EXIT_EVENT - /** Configuration option: if specified then the I/O queues APIs are included * in the kernel.*/ #define CH_USE_QUEUES -- cgit v1.2.3