aboutsummaryrefslogtreecommitdiffstats
path: root/src/chthreads.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-10-25 10:35:10 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-10-25 10:35:10 +0000
commit3547c3916175d387a43c6d3a36330550b1d278d5 (patch)
tree4df53f634f4c2923df3c8fac48a3826aa0e24dc2 /src/chthreads.c
parent902470d1c542735b989a727355744a974af43de4 (diff)
downloadChibiOS-3547c3916175d387a43c6d3a36330550b1d278d5.tar.gz
ChibiOS-3547c3916175d387a43c6d3a36330550b1d278d5.tar.bz2
ChibiOS-3547c3916175d387a43c6d3a36330550b1d278d5.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@482 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chthreads.c')
-rw-r--r--src/chthreads.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/chthreads.c b/src/chthreads.c
index 58df0a5c1..11d2442ad 100644
--- a/src/chthreads.c
+++ b/src/chthreads.c
@@ -288,6 +288,17 @@ void chThdTerminate(Thread *tp) {
}
/**
+ * Suspends the invoking thread for the specified time.
+ * @param time the system ticks number
+ */
+void chThdSleep(systime_t time) {
+
+ chSysLock();
+ chSchGoSleepTimeoutS(PRSLEEP, time);
+ chSysUnlock();
+}
+
+/**
* Terminates the current thread by specifying an exit status code.
*
* @param msg the thread exit code. The code can be retrieved by using