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/ports | |
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/ports')
-rw-r--r-- | os/ports/GCC/ARM/chtypes.h | 1 | ||||
-rw-r--r-- | os/ports/GCC/ARMCMx/chcore.h | 4 | ||||
-rw-r--r-- | os/ports/GCC/ARMCMx/chtypes.h | 1 | ||||
-rw-r--r-- | os/ports/GCC/AVR/chtypes.h | 1 | ||||
-rw-r--r-- | os/ports/GCC/MSP430/chtypes.h | 1 | ||||
-rw-r--r-- | os/ports/GCC/PPC/chtypes.h | 1 | ||||
-rw-r--r-- | os/ports/GCC/SIMIA32/chtypes.h | 1 | ||||
-rw-r--r-- | os/ports/IAR/ARMCMx/chtypes.h | 1 | ||||
-rw-r--r-- | os/ports/RC/STM8/chtypes.h | 60 | ||||
-rw-r--r-- | os/ports/RVCT/ARMCMx/chtypes.h | 1 | ||||
-rw-r--r-- | os/ports/cosmic/STM8/chtypes.h | 60 |
11 files changed, 32 insertions, 100 deletions
diff --git a/os/ports/GCC/ARM/chtypes.h b/os/ports/GCC/ARM/chtypes.h index 41dffc938..eb0c04c77 100644 --- a/os/ports/GCC/ARM/chtypes.h +++ b/os/ports/GCC/ARM/chtypes.h @@ -42,6 +42,7 @@ typedef int32_t bool_t; /**< Fast boolean type. */ typedef uint8_t tmode_t; /**< Thread flags. */
typedef uint8_t tstate_t; /**< Thread state. */
typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
typedef uint32_t tprio_t; /**< Thread priority. */
typedef int32_t msg_t; /**< Inter-thread message. */
typedef int32_t eventid_t; /**< Event Id. */
diff --git a/os/ports/GCC/ARMCMx/chcore.h b/os/ports/GCC/ARMCMx/chcore.h index 7f97cde5d..b2cf4deaa 100644 --- a/os/ports/GCC/ARMCMx/chcore.h +++ b/os/ports/GCC/ARMCMx/chcore.h @@ -168,8 +168,8 @@ struct intctx {}; * @brief Inlineable version of this kernel function.
*/
#define chSchIsPreemptionRequired() \
- (rlist.r_preempt ? firstprio(&rlist.r_queue) > currp->p_prio : \
- firstprio(&rlist.r_queue) >= currp->p_prio)
+ (currp->p_preempt ? firstprio(&rlist.r_queue) > currp->p_prio : \
+ firstprio(&rlist.r_queue) >= currp->p_prio)
#else /* CH_TIME_QUANTUM == 0 */
#define chSchIsPreemptionRequired() \
(firstprio(&rlist.r_queue) > currp->p_prio)
diff --git a/os/ports/GCC/ARMCMx/chtypes.h b/os/ports/GCC/ARMCMx/chtypes.h index 2105c7130..4d896fea0 100644 --- a/os/ports/GCC/ARMCMx/chtypes.h +++ b/os/ports/GCC/ARMCMx/chtypes.h @@ -40,6 +40,7 @@ typedef int32_t bool_t; /**< Fast boolean type. */ typedef uint8_t tmode_t; /**< Thread flags. */
typedef uint8_t tstate_t; /**< Thread state. */
typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
typedef uint32_t tprio_t; /**< Thread priority. */
typedef int32_t msg_t; /**< Inter-thread message. */
typedef int32_t eventid_t; /**< Event Id. */
diff --git a/os/ports/GCC/AVR/chtypes.h b/os/ports/GCC/AVR/chtypes.h index 3831f0f7c..0c8197823 100644 --- a/os/ports/GCC/AVR/chtypes.h +++ b/os/ports/GCC/AVR/chtypes.h @@ -42,6 +42,7 @@ typedef int8_t bool_t; /**< Fast boolean type. */ typedef uint8_t tmode_t; /**< Thread flags. */
typedef uint8_t tstate_t; /**< Thread state. */
typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
typedef uint8_t tprio_t; /**< Thread priority. */
typedef int16_t msg_t; /**< Inter-thread message. */
typedef uint8_t eventid_t; /**< Event Id. */
diff --git a/os/ports/GCC/MSP430/chtypes.h b/os/ports/GCC/MSP430/chtypes.h index cd35a341e..a56351016 100644 --- a/os/ports/GCC/MSP430/chtypes.h +++ b/os/ports/GCC/MSP430/chtypes.h @@ -42,6 +42,7 @@ typedef int16_t bool_t; /**< Fast boolean type. */ typedef uint8_t tmode_t; /**< Thread flags. */
typedef uint8_t tstate_t; /**< Thread state. */
typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
typedef uint16_t tprio_t; /**< Thread priority. */
typedef int16_t msg_t; /**< Inter-thread message. */
typedef int16_t eventid_t; /**< Event Id. */
diff --git a/os/ports/GCC/PPC/chtypes.h b/os/ports/GCC/PPC/chtypes.h index 88e9742b7..debc5f0f8 100644 --- a/os/ports/GCC/PPC/chtypes.h +++ b/os/ports/GCC/PPC/chtypes.h @@ -54,6 +54,7 @@ typedef int32_t bool_t; /**< Fast boolean type. */ typedef uint8_t tmode_t; /**< Thread flags. */
typedef uint8_t tstate_t; /**< Thread state. */
typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
typedef uint32_t tprio_t; /**< Thread priority. */
typedef int32_t msg_t; /**< Inter-thread message. */
typedef int32_t eventid_t; /**< Event Id. */
diff --git a/os/ports/GCC/SIMIA32/chtypes.h b/os/ports/GCC/SIMIA32/chtypes.h index 693ade588..54d701044 100644 --- a/os/ports/GCC/SIMIA32/chtypes.h +++ b/os/ports/GCC/SIMIA32/chtypes.h @@ -34,6 +34,7 @@ typedef int32_t bool_t; /**< Fast boolean type. */ typedef uint8_t tmode_t; /**< Thread flags. */
typedef uint8_t tstate_t; /**< Thread state. */
typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
typedef uint32_t tprio_t; /**< Thread priority. */
typedef int32_t msg_t; /**< Inter-thread message. */
typedef int32_t eventid_t; /**< Event Id. */
diff --git a/os/ports/IAR/ARMCMx/chtypes.h b/os/ports/IAR/ARMCMx/chtypes.h index e8a6a7dc4..36e24e5c7 100644 --- a/os/ports/IAR/ARMCMx/chtypes.h +++ b/os/ports/IAR/ARMCMx/chtypes.h @@ -40,6 +40,7 @@ typedef int32_t bool_t; /**< Fast boolean type. */ typedef uint8_t tmode_t; /**< Thread flags. */
typedef uint8_t tstate_t; /**< Thread state. */
typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
typedef uint32_t tprio_t; /**< Thread priority. */
typedef int32_t msg_t; /**< Inter-thread message. */
typedef int32_t eventid_t; /**< Event Id. */
diff --git a/os/ports/RC/STM8/chtypes.h b/os/ports/RC/STM8/chtypes.h index 3a0efe78a..7d5ebdb31 100644 --- a/os/ports/RC/STM8/chtypes.h +++ b/os/ports/RC/STM8/chtypes.h @@ -47,55 +47,17 @@ typedef uint8_t uint_fast8_t; /**< C99-style 8 bits unsigned. */ typedef uint16_t uint_fast16_t; /**< C99-style 16 bits unsigned. */
typedef uint32_t uint_fast32_t; /**< C99-style 32 bits unsigned. */
-/**
- * @brief Boolean, recommended the fastest signed.
- */
-typedef int8_t bool_t;
-
-/**
- * @brief Thread mode flags, uint8_t is ok.
- */
-typedef uint8_t tmode_t;
-
-/**
- * @brief Thread state, uint8_t is ok.
- */
-typedef uint8_t tstate_t;
-
-/**
- * @brief Thread references counter, uint8_t is ok.
- */
-typedef uint8_t trefs_t;
-
-/**
- * @brief Priority, use the fastest unsigned type.
- */
-typedef uint8_t tprio_t;
-
-/**
- * @brief Message, use signed pointer equivalent.
- */
-typedef int16_t msg_t;
-
-/**
- * @brief Event Id, use fastest signed.
- */
-typedef int8_t eventid_t;
-
-/**
- * @brief Event Mask, recommended fastest unsigned.
- */
-typedef uint8_t eventmask_t;
-
-/**
- * @brief System Time, recommended fastest unsigned.
- */
-typedef uint16_t systime_t;
-
-/**
- * @brief Counter, recommended fastest signed.
- */
-typedef int8_t cnt_t;
+typedef int8_t bool_t; /**< Fast boolean type. */
+typedef uint8_t tmode_t; /**< Thread flags. */
+typedef uint8_t tstate_t; /**< Thread state. */
+typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
+typedef uint8_t tprio_t; /**< Thread priority. */
+typedef int16_t msg_t; /**< Inter-thread message. */
+typedef int8_t eventid_t; /**< Event Id. */
+typedef uint8_t eventmask_t; /**< Events mask. */
+typedef uint16_t systime_t; /**< System time. */
+typedef int8_t cnt_t; /**< Resources counter. */
/**
* @brief Inline function modifier.
diff --git a/os/ports/RVCT/ARMCMx/chtypes.h b/os/ports/RVCT/ARMCMx/chtypes.h index 41f37c6f4..b9baf2502 100644 --- a/os/ports/RVCT/ARMCMx/chtypes.h +++ b/os/ports/RVCT/ARMCMx/chtypes.h @@ -40,6 +40,7 @@ typedef int32_t bool_t; /**< Fast boolean type. */ typedef uint8_t tmode_t; /**< Thread flags. */
typedef uint8_t tstate_t; /**< Thread state. */
typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
typedef uint32_t tprio_t; /**< Thread priority. */
typedef int32_t msg_t; /**< Inter-thread message. */
typedef int32_t eventid_t; /**< Event Id. */
diff --git a/os/ports/cosmic/STM8/chtypes.h b/os/ports/cosmic/STM8/chtypes.h index c957863d4..9c1749a96 100644 --- a/os/ports/cosmic/STM8/chtypes.h +++ b/os/ports/cosmic/STM8/chtypes.h @@ -47,55 +47,17 @@ typedef uint8_t uint_fast8_t; /**< C99-style 8 bits unsigned. */ typedef uint16_t uint_fast16_t; /**< C99-style 16 bits unsigned. */
typedef uint32_t uint_fast32_t; /**< C99-style 32 bits unsigned. */
-/**
- * @brief Boolean, recommended the fastest signed.
- */
-typedef int8_t bool_t;
-
-/**
- * @brief Thread mode flags, uint8_t is ok.
- */
-typedef uint8_t tmode_t;
-
-/**
- * @brief Thread state, uint8_t is ok.
- */
-typedef uint8_t tstate_t;
-
-/**
- * @brief Thread references counter, uint8_t is ok.
- */
-typedef uint8_t trefs_t;
-
-/**
- * @brief Priority, use the fastest unsigned type.
- */
-typedef uint8_t tprio_t;
-
-/**
- * @brief Message, use signed pointer equivalent.
- */
-typedef int16_t msg_t;
-
-/**
- * @brief Event Id, use fastest signed.
- */
-typedef int8_t eventid_t;
-
-/**
- * @brief Event Mask, recommended fastest unsigned.
- */
-typedef uint8_t eventmask_t;
-
-/**
- * @brief System Time, recommended fastest unsigned.
- */
-typedef uint16_t systime_t;
-
-/**
- * @brief Counter, recommended fastest signed.
- */
-typedef int8_t cnt_t;
+typedef int8_t bool_t; /**< Fast boolean type. */
+typedef uint8_t tmode_t; /**< Thread flags. */
+typedef uint8_t tstate_t; /**< Thread state. */
+typedef uint8_t trefs_t; /**< Thread references counter. */
+typedef uint8_t tslices_t; /**< Thread time slices counter. */
+typedef uint8_t tprio_t; /**< Thread priority. */
+typedef int16_t msg_t; /**< Inter-thread message. */
+typedef int8_t eventid_t; /**< Event Id. */
+typedef uint8_t eventmask_t; /**< Events mask. */
+typedef uint16_t systime_t; /**< System time. */
+typedef int8_t cnt_t; /**< Resources counter. */
/**
* @brief Inline function modifier.
|