1. 程式人生 > >μC/OS-II 的任務排程演算法分析

μC/OS-II 的任務排程演算法分析

/*
*********************************************************************************************************
*                                       PRIORITY RESOLUTION TABLE
*
* Note: Index into table is bit pattern to resolve highest priority
*       Indexed value corresponds to highest priority bit position (i.e. 0..7)
*********************************************************************************************************
*/


INT8U  const  OSUnMapTbl[256] = {
    0010201030102010,       /* 0x00 to 0x0F                             */
    4010201030102010,       /* 0x10 to 0x1F                             */
    5010201030102010,       /* 0x20 to 0x2F                             */

    4010201030102010,       /* 0x30 to 0x3F                             */
    6010201030102010,       /* 0x40 to 0x4F                             */
    4010201030102010,       /* 0x50 to 0x5F                             */
    501020103
0102010,       /* 0x60 to 0x6F                             */
    4010201030102010,       /* 0x70 to 0x7F                             */
    7010201030102010,       /* 0x80 to 0x8F                             */
    4010201030102010,       /* 0x90 to 0x9F                             */
    5010201030102010,       /* 0xA0 to 0xAF                             */
    4010201030102010,       /* 0xB0 to 0xBF                             */
    6010201030102010,       /* 0xC0 to 0xCF                             */
    4010201030102010,       /* 0xD0 to 0xDF                             */
    5010201030102010,       /* 0xE0 to 0xEF                             */
    4010201030102010        /* 0xF0 to 0xFF                             */
};