aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-07-05 07:11:12 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-07-05 07:11:12 +0000
commitaa8ef7e8e770734aee0cfcb024cb5db8e51c0639 (patch)
treee455e8ad21f36f0dc30387c258d8b4af9c860257
parentf53cac6961b33a09913a5ae87dfe410686f153bb (diff)
downloadChibiOS-aa8ef7e8e770734aee0cfcb024cb5db8e51c0639.tar.gz
ChibiOS-aa8ef7e8e770734aee0cfcb024cb5db8e51c0639.tar.bz2
ChibiOS-aa8ef7e8e770734aee0cfcb024cb5db8e51c0639.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@334 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--readme.txt7
-rw-r--r--src/chthreads.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/readme.txt b/readme.txt
index 5fbee71f4..59428015d 100644
--- a/readme.txt
+++ b/readme.txt
@@ -76,9 +76,10 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
*** 0.6.7 ***
- NEW: New chThdCreateFast() API, it is a simplified form of chThdCreate()
- that allows even faster threads creation. The new API does not support
- the "mode" and "arg" parameters (still available in the old API).
-- OPT: Removed an unrequired initialization from the chThdCreate().
+ that allows even faster threads creation. The new API does not support
+ the "mode" and "arg" parameters (still available in the old API).
+- OPT: Removed an unrequired initialization and made other small optimizations
+ to the chThdCreate().
- OPT: Improvements to the test framework, now a virtual timer is used instead
of software loops into the bechmarks in order to have more stable results.
- Added the C++ wrapper entries to the documentation.
diff --git a/src/chthreads.c b/src/chthreads.c
index d12bced10..338a65d52 100644
--- a/src/chthreads.c
+++ b/src/chthreads.c
@@ -97,8 +97,8 @@ Thread *chThdCreate(tprio_t prio, tmode_t mode, void *workspace,
#ifdef CH_USE_DEBUG
memfill(workspace, wsize, MEM_FILL_PATTERN);
#endif
- init_thread(prio, mode, tp);
SETUP_CONTEXT(workspace, wsize, pf, arg);
+ init_thread(prio, mode, tp);
#ifdef CH_USE_RESUME
if (tp->p_flags & P_SUSPENDED)
tp->p_state = PRSUSPENDED;
@@ -137,8 +137,8 @@ Thread *chThdCreateFast(tprio_t prio, void *workspace,
#ifdef CH_USE_DEBUG
memfill(workspace, wsize, MEM_FILL_PATTERN);
#endif
- init_thread(prio, 0, tp);
SETUP_CONTEXT(workspace, wsize, pf, NULL);
+ init_thread(prio, 0, tp);
chSysLock();
chSchWakeupS(tp, RDY_OK);
chSysUnlock();