Home microC-OS-II 스케줄러
Post
Cancel

microC-OS-II 스케줄러

microC-OS2


  • os의 멀티태스킹은 OSStart( )를 호출하며 시작된다.
    • 적어도 1개 이상의 응용 task가 있어야 한다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
void  OSStart (void) // os 시작
{
    INT8U y;
    INT8U x;

    if (OSRunning == FALSE) {
        y             = OSUnMapTbl[OSRdyGrp];        /* Find highest priority's task priority number   */
        x             = OSUnMapTbl[OSRdyTbl[y]];
        OSPrioHighRdy = (INT8U)((y << 3) + x);
        OSPrioCur     = OSPrioHighRdy;
        OSTCBHighRdy  = OSTCBPrioTbl[OSPrioHighRdy]; /* Point to highest priority task ready to run    */
        OSTCBCur      = OSTCBHighRdy;
        OSStartHighRdy();                            /* Execute target specific code to start task     */

    }

}
This post is licensed under CC BY 4.0 by the author.