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();