diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-07-30 11:01:56 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-07-30 11:01:56 +0000 |
commit | e150283e1f071673e1d3490cbf85651e5502d421 (patch) | |
tree | a34e5264e7c789b87ef2414472bbe8eb4a93d332 /src/include/inline.h | |
parent | 0cd87f700cbc1d8dcb03bafe90793626d6efbb32 (diff) | |
download | ChibiOS-e150283e1f071673e1d3490cbf85651e5502d421.tar.gz ChibiOS-e150283e1f071673e1d3490cbf85651e5502d421.tar.bz2 ChibiOS-e150283e1f071673e1d3490cbf85651e5502d421.zip |
Various optimizations to the scheduler.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@378 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include/inline.h')
-rw-r--r-- | src/include/inline.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/inline.h b/src/include/inline.h index 85de20f3f..9cc18974d 100644 --- a/src/include/inline.h +++ b/src/include/inline.h @@ -36,7 +36,7 @@ static INLINE void prio_insert(Thread *tp, ThreadsQueue *tqp) { tp->p_prev->p_next = cp->p_prev = tp;
}
-static INLINE void fifo_insert(Thread *tp, ThreadsQueue *tqp) {
+static INLINE void queue_insert(Thread *tp, ThreadsQueue *tqp) {
tp->p_prev = (tp->p_next = (Thread *)tqp)->p_prev;
tp->p_prev->p_next = tqp->p_prev = tp;
@@ -49,6 +49,13 @@ static INLINE Thread *fifo_remove(ThreadsQueue *tqp) { return tp;
}
+static INLINE Thread *lifo_remove(ThreadsQueue *tqp) {
+ Thread *tp = tqp->p_prev;
+
+ (tqp->p_prev = tp->p_prev)->p_next = (Thread *)tqp;
+ return tp;
+}
+
static INLINE Thread *dequeue(Thread *tp) {
tp->p_prev->p_next = tp->p_next;
|