diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-12-23 08:47:07 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-12-23 08:47:07 +0000 |
commit | 866e26bd215e035459fce31eebd3ae9ac4b05c1c (patch) | |
tree | aeef455ab7aa0be15c597ae6e67587f4d9fe2f20 | |
parent | 7f7cdc881e70aa0356eaa647647ab5d4cd2b5d27 (diff) | |
download | ChibiOS-866e26bd215e035459fce31eebd3ae9ac4b05c1c.tar.gz ChibiOS-866e26bd215e035459fce31eebd3ae9ac4b05c1c.tar.bz2 ChibiOS-866e26bd215e035459fce31eebd3ae9ac4b05c1c.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@541 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | readme.txt | 2 | ||||
-rw-r--r-- | src/chthreads.c | 4 | ||||
-rw-r--r-- | src/include/threads.h | 6 |
3 files changed, 10 insertions, 2 deletions
diff --git a/readme.txt b/readme.txt index 62002e723..d52a41c0d 100644 --- a/readme.txt +++ b/readme.txt @@ -90,6 +90,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, - Small fixes to the documentation.
*** 0.8.2 ***
+- NEW: Introduced new API chThdSleepS() as a macro, no real changes in the
+ kernel code.
- FIX: Included the files that were missing from version 0.8.1 distribution.
- FIX: Duplicated sections in the documentation removed.
- FIX: Minor problem in Cortex-M3 and AVR ports when the kernel is compiled
diff --git a/src/chthreads.c b/src/chthreads.c index 6b1121d97..a1c8a7b4e 100644 --- a/src/chthreads.c +++ b/src/chthreads.c @@ -294,7 +294,7 @@ void chThdTerminate(Thread *tp) { void chThdSleep(systime_t time) { chSysLock(); - chSchGoSleepTimeoutS(PRSLEEP, time); + chThdSleepS(time); chSysUnlock(); } @@ -307,7 +307,7 @@ void chThdSleepUntil(systime_t time) { chSysLock(); if ((time -= chSysGetTime()) > 0) - chSchGoSleepTimeoutS(PRSLEEP, time); + chThdSleepS(time); chSysUnlock(); } diff --git a/src/include/threads.h b/src/include/threads.h index b939ba3a1..c58ddc76a 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -266,6 +266,12 @@ extern "C" { chThdCreateStatic(workspace, wsize, prio, pf, NULL) /** + * Suspends the invoking thread for the specified time. + * @param time the delay in system ticks + */ +#define chThdSleepS(time) chSchGoSleepTimeoutS(PRSLEEP, time) + +/** * Delays the invoking thread for the specified number of seconds. * @note The specified time is rounded up to a value allowed by the real * system clock. |