diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-02-06 19:45:47 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-02-06 19:45:47 +0000 |
commit | 4401d0e7b2874074e37c90e0178667a854d0da1f (patch) | |
tree | 423d9ede640b9a9452e89392bcf7a7b6f9a5e464 /os/kernel/src/chthreads.c | |
parent | 28c1f163a94e9aaad5d4ec3f9534b89677f9e5b1 (diff) | |
download | ChibiOS-4401d0e7b2874074e37c90e0178667a854d0da1f.tar.gz ChibiOS-4401d0e7b2874074e37c90e0178667a854d0da1f.tar.bz2 ChibiOS-4401d0e7b2874074e37c90e0178667a854d0da1f.zip |
Round robin scheduling improvements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3930 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chthreads.c')
-rw-r--r-- | os/kernel/src/chthreads.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c index a73697eb4..eccf466d0 100644 --- a/os/kernel/src/chthreads.c +++ b/os/kernel/src/chthreads.c @@ -71,6 +71,9 @@ Thread *_thread_init(Thread *tp, tprio_t prio) { tp->p_prio = prio;
tp->p_state = THD_STATE_SUSPENDED;
tp->p_flags = THD_MEM_MODE_STATIC;
+#if CH_TIME_QUANTUM > 0
+ tp->p_preempt = CH_TIME_QUANTUM;
+#endif
#if CH_USE_MUTEXES
tp->p_realprio = prio;
tp->p_mtxlist = NULL;
|