aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-12-28 10:07:46 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-12-28 10:07:46 +0000
commit3e9765e2069a9faedff2721a1abf46607cf1189d (patch)
tree12de2adbe2b6107499ce604d50578ff717667fd8 /src
parentdd39b808aceeb2cc726c9b90fe9ca3116bf0ebd7 (diff)
downloadChibiOS-3e9765e2069a9faedff2721a1abf46607cf1189d.tar.gz
ChibiOS-3e9765e2069a9faedff2721a1abf46607cf1189d.tar.bz2
ChibiOS-3e9765e2069a9faedff2721a1abf46607cf1189d.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@545 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r--src/chthreads.c38
-rw-r--r--src/include/threads.h42
-rw-r--r--src/templates/chconf.h12
3 files changed, 2 insertions, 90 deletions
diff --git a/src/chthreads.c b/src/chthreads.c
index a1c8a7b4e..14c507bb4 100644
--- a/src/chthreads.c
+++ b/src/chthreads.c
@@ -182,39 +182,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:<br>
- * <ul>
- * <li>\p P_SUSPENDED, the thread is created in the
- * \p PRSUSPENDED state and a subsequent call to
- * \p chThdResume() will make it ready for
- * execution.</li>
- * </ul>
- * @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.
*
* @param newprio the new priority of the running thread
@@ -324,14 +291,9 @@ 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
@@ -217,30 +217,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:<br>
- * <ul>
- * <li>Create the thread suspended, register on the event source
- * and then resume the thread (recommended).</li>
- * <li>Create the thread with a lower priority then register on it.
- * This does not work if the hardware is capable of multiple
- * physical threads.</li>
- * </ul>
- * @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().
* @param tp the pointer to the thread
@@ -248,24 +224,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