diff options
| author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-12-22 11:34:39 +0000 | 
|---|---|---|
| committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-12-22 11:34:39 +0000 | 
| commit | cf3378588cedd2015f8c59b77fcc3fb8f9164ec8 (patch) | |
| tree | 95c80e51c9f14ccd95af5da97a560a57bbd87224 /src/include/inline.h | |
| parent | 6c8aadd17a89d399a8ee2e77d5885f4db3bcab06 (diff) | |
| download | ChibiOS-cf3378588cedd2015f8c59b77fcc3fb8f9164ec8.tar.gz ChibiOS-cf3378588cedd2015f8c59b77fcc3fb8f9164ec8.tar.bz2 ChibiOS-cf3378588cedd2015f8c59b77fcc3fb8f9164ec8.zip | |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@155 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include/inline.h')
| -rw-r--r-- | src/include/inline.h | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/src/include/inline.h b/src/include/inline.h index 1982fd075..85de20f3f 100644 --- a/src/include/inline.h +++ b/src/include/inline.h @@ -26,6 +26,16 @@   *       this is true for GCC, not sure about other compilers.
   */
  #ifdef CH_OPTIMIZE_SPEED
 +static INLINE void prio_insert(Thread *tp, ThreadsQueue *tqp) {
 +
 +  Thread *cp = tqp->p_next;
 +  while ((cp != (Thread *)tqp) && (cp->p_prio >= tp->p_prio))
 +    cp = cp->p_next;
 +  /* Insertion on p_prev.*/
 +  tp->p_prev = (tp->p_next = cp)->p_prev;
 +  tp->p_prev->p_next = cp->p_prev = tp;
 +}
 +
  static INLINE void fifo_insert(Thread *tp, ThreadsQueue *tqp) {
    tp->p_prev = (tp->p_next = (Thread *)tqp)->p_prev;
 | 
