亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? os_cpu_c.c

?? ucos操作系統的完整的中文注釋
?? C
字號:
/*
*********************************************************************************************************
*                                               uC/OS-II
*                                         The Real-Time Kernel
*
*                         (c) Copyright 1992-2002, Jean J. Labrosse, Weston, FL
*                                          All Rights Reserved
*
*
*                                       80x86/80x88 Specific code
*                                          LARGE MEMORY MODEL
*
*                                          Borland C/C++ V4.51
*
* File         : OS_CPU_C.C
* By           : Jean J. Labrosse
*********************************************************************************************************
*/

#define  OS_CPU_GLOBALS
#include "includes.h"

/*
*********************************************************************************************************
*                                       OS INITIALIZATION HOOK
*                                            (BEGINNING)
*
* Description: This function is called by OSInit() at the beginning of OSInit().
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts should be disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void  OSInitHookBegin (void)
{
}
#endif

/*
*********************************************************************************************************
*                                       OS INITIALIZATION HOOK
*                                               (END)
*
* Description: This function is called by OSInit() at the end of OSInit().
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts should be disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void  OSInitHookEnd (void)
{
}
#endif

/*$PAGE*/
/*
*********************************************************************************************************
*                                          TASK CREATION HOOK
*
* Description: This function is called when a task is created.
*
* Arguments  : ptcb   is a pointer to the task control block of the task being created.
*
* Note(s)    : 1) Interrupts are disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 
void  OSTaskCreateHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                       /* Prevent compiler warning                                     */
}
#endif


/*
*********************************************************************************************************
*                                           TASK DELETION HOOK
*
* Description: This function is called when a task is deleted.
*
* Arguments  : ptcb   is a pointer to the task control block of the task being deleted.
*
* Note(s)    : 1) Interrupts are disabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 
void  OSTaskDelHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                       /* Prevent compiler warning                                     */
}
#endif

/*
*********************************************************************************************************
*                                             IDLE TASK HOOK
*
* Description: This function is called by the idle task.  This hook has been added to allow you to do  
*              such things as STOP the CPU to conserve power.
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts are enabled during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251
void  OSTaskIdleHook (void)
{
}
#endif

/*
*********************************************************************************************************
*                                           STATISTIC TASK HOOK
*
* Description: This function is called every second by uC/OS-II's statistics task.  This allows your 
*              application to add functionality to the statistics task.
*
* Arguments  : none
*********************************************************************************************************
*/

#if OS_CPU_HOOKS_EN > 0 
void  OSTaskStatHook (void)
{
}
#endif

/*$PAGE*/
/*
*********************************************************************************************************
*                                        INITIALIZE A TASK'S STACK
*
* Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the
*              stack frame of the task being created.  This function is highly processor specific.
*
* Arguments  : task          is a pointer to the task code
*
*              pdata         is a pointer to a user supplied data area that will be passed to the task
*                            when the task first executes.
*
*              ptos          is a pointer to the top of stack.  It is assumed that 'ptos' points to
*                            a 'free' entry on the task stack.  If OS_STK_GROWTH is set to 1 then 
*                            'ptos' will contain the HIGHEST valid address of the stack.  Similarly, if
*                            OS_STK_GROWTH is set to 0, the 'ptos' will contains the LOWEST valid address
*                            of the stack.
*
*              opt           specifies options that can be used to alter the behavior of OSTaskStkInit().
*                            (see uCOS_II.H for OS_TASK_OPT_???).
*
* Returns    : Always returns the location of the new top-of-stack' once the processor registers have
*              been placed on the stack in the proper order.
*
* Note(s)    : Interrupts are enabled when your task starts executing. You can change this by setting the
*              PSW to 0x0002 instead.  In this case, interrupts would be disabled upon task startup.  The
*              application code would be responsible for enabling interrupts at the beginning of the task
*              code.  You will need to modify OSTaskIdle() and OSTaskStat() so that they enable 
*              interrupts.  Failure to do this will make your system crash!
*********************************************************************************************************
*/

OS_STK  *OSTaskStkInit (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt)
{
    INT16U *stk;


    opt    = opt;                           /* 'opt' is not used, prevent warning                      */
    stk    = (INT16U *)ptos;                /* Load stack pointer                                      */
    *stk-- = (INT16U)FP_SEG(pdata);         /* Simulate call to function with argument                 */
    *stk-- = (INT16U)FP_OFF(pdata);         
    *stk-- = (INT16U)FP_SEG(task);
    *stk-- = (INT16U)FP_OFF(task);
    *stk-- = (INT16U)0x0202;                /* SW = Interrupts enabled                                 */
    *stk-- = (INT16U)FP_SEG(task);          /* Put pointer to task   on top of stack                   */
    *stk-- = (INT16U)FP_OFF(task);
    *stk-- = (INT16U)0xAAAA;                /* AX = 0xAAAA                                             */
    *stk-- = (INT16U)0xCCCC;                /* CX = 0xCCCC                                             */
    *stk-- = (INT16U)0xDDDD;                /* DX = 0xDDDD                                             */
    *stk-- = (INT16U)0xBBBB;                /* BX = 0xBBBB                                             */
    *stk-- = (INT16U)0x0000;                /* SP = 0x0000                                             */
    *stk-- = (INT16U)0x1111;                /* BP = 0x1111                                             */
    *stk-- = (INT16U)0x2222;                /* SI = 0x2222                                             */
    *stk-- = (INT16U)0x3333;                /* DI = 0x3333                                             */
    *stk-- = (INT16U)0x4444;                /* ES = 0x4444                                             */
    *stk   = _DS;                           /* DS = Current value of DS                                */
    return ((OS_STK *)stk);
}

/*$PAGE*/
/*
*********************************************************************************************************
*                        INITIALIZE A TASK'S STACK FOR FLOATING POINT EMULATION
*
* Description: This function MUST be called BEFORE calling either OSTaskCreate() or OSTaskCreateExt() in
*              order to initialize the task's stack to allow the task to use the Borland floating-point 
*              emulation.  The returned pointer MUST be used in the task creation call.
*
*              Ex.:   OS_STK TaskStk[1000];
*
*
*                     void main (void)
*                     {
*                         OS_STK *ptos;
*                         OS_STK *pbos;
*                         INT32U  size;
*
*
*                         OSInit();
*                         .
*                         .
*                         ptos  = &TaskStk[999];
*                         pbos  = &TaskStk[0];
*                         psize = 1000;
*                         OSTaskStkInit_FPE_x86(&ptos, &pbos, &size);
*                         OSTaskCreate(Task, (void *)0, ptos, 10);
*                         .
*                         .
*                         OSStart();
*                     }
*
* Arguments  : pptos         is the pointer to the task's top-of-stack pointer which would be passed to 
*                            OSTaskCreate() or OSTaskCreateExt().
*
*              ppbos         is the pointer to the new bottom of stack pointer which would be passed to
*                            OSTaskCreateExt().
*
*              psize         is a pointer to the size of the stack (in number of stack elements).  You 
*                            MUST allocate sufficient stack space to leave at least 384 bytes for the 
*                            floating-point emulation.
*
* Returns    : The new size of the stack once memory is allocated to the floating-point emulation.
*
* Note(s)    : 1) _SS  is a Borland 'pseudo-register' and returns the contents of the Stack Segment (SS)
*              2) The pointer to the top-of-stack (pptos) will be modified so that it points to the new
*                 top-of-stack.
*              3) The pointer to the bottom-of-stack (ppbos) will be modified so that it points to the new
*                 bottom-of-stack.
*              4) The new size of the stack is adjusted to reflect the fact that memory was reserved on
*                 the stack for the floating-point emulation.
*********************************************************************************************************
*/

/*$PAGE*/
void  OSTaskStkInit_FPE_x86 (OS_STK **pptos, OS_STK **ppbos, INT32U *psize)
{
    INT32U   lin_tos;                                 /* 'Linear' version of top-of-stack    address   */
    INT32U   lin_bos;                                 /* 'Linear' version of bottom-of-stack address   */
    INT16U   seg;
    INT16U   off;
    INT32U   bytes;


    seg      = FP_SEG(*pptos);                        /* Decompose top-of-stack pointer into seg:off   */
    off      = FP_OFF(*pptos);
    lin_tos  = ((INT32U)seg << 4) + (INT32U)off;      /* Convert seg:off to linear address             */
    bytes    = *psize * sizeof(OS_STK);               /* Determine how many bytes for the stack        */
    lin_bos  = (lin_tos - bytes + 15) & 0xFFFFFFF0L;  /* Ensure paragraph alignment for BOS            */
    
    seg      = (INT16U)(lin_bos >> 4);                /* Get new 'normalized' segment                  */
    *ppbos   = (OS_STK *)MK_FP(seg, 0x0000);          /* Create 'normalized' BOS pointer               */
    memcpy(*ppbos, MK_FP(_SS, 0), 384);               /* Copy FP emulation memory to task's stack      */
    bytes    = bytes - 16;                            /* Loose 16 bytes because of alignment           */
    *pptos   = (OS_STK *)MK_FP(seg, (INT16U)bytes);   /* Determine new top-of-stack                    */
    *ppbos   = (OS_STK *)MK_FP(seg, 384);             /* Determine new bottom-of-stack                 */
    bytes    = bytes - 384;
    *psize   = bytes / sizeof(OS_STK);                /* Determine new stack size                      */
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                           TASK SWITCH HOOK
*
* Description: This function is called when a task switch is performed.  This allows you to perform other
*              operations during a context switch.
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts are disabled during this call.
*              2) It is assumed that the global pointer 'OSTCBHighRdy' points to the TCB of the task that
*                 will be 'switched in' (i.e. the highest priority task) and, 'OSTCBCur' points to the 
*                 task being switched out (i.e. the preempted task).
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 
void  OSTaskSwHook (void)
{
}
#endif

/*
*********************************************************************************************************
*                                           OSTCBInit() HOOK
*
* Description: This function is called by OS_TCBInit() after setting up most of the TCB.
*
* Arguments  : ptcb    is a pointer to the TCB of the task being created.
*
* Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
void  OSTCBInitHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                                           /* Prevent Compiler warning                 */
}
#endif


/*
*********************************************************************************************************
*                                               TICK HOOK
*
* Description: This function is called every tick.
*
* Arguments  : none
*
* Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
*********************************************************************************************************
*/
#if OS_CPU_HOOKS_EN > 0 
void  OSTimeTickHook (void)
{
}
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本不卡一二三| 91视频免费看| 五月开心婷婷久久| 亚洲免费观看在线观看| 亚洲国产精品成人综合色在线婷婷| 精品剧情v国产在线观看在线| 91精品国产综合久久久蜜臀图片| 欧美色图片你懂的| 欧洲在线/亚洲| 在线观看视频一区| 欧美日韩五月天| 欧美丰满少妇xxxbbb| 91.麻豆视频| 日韩视频一区二区| 精品国产91久久久久久久妲己| 精品捆绑美女sm三区| 国产亚洲精品精华液| 欧美国产日韩a欧美在线观看| 国产精品污www在线观看| 国产精品久久久久国产精品日日| 亚洲少妇30p| 亚洲小说欧美激情另类| 天天综合天天综合色| 蜜桃av一区二区| 国产精品一区二区你懂的| 成人天堂资源www在线| 一本色道久久综合狠狠躁的推荐 | 成人av网站免费观看| 成人自拍视频在线观看| 99精品视频免费在线观看| 欧美天堂亚洲电影院在线播放 | 伊人婷婷欧美激情| 亚洲妇熟xx妇色黄| 久久se精品一区精品二区| 精品制服美女久久| 成人sese在线| 欧美视频完全免费看| 精品免费视频.| 亚洲天堂av老司机| 亚洲成人av一区二区三区| 国内久久精品视频| 色综合久久久久久久久久久| 欧美一卡2卡三卡4卡5免费| 久久亚洲一级片| 亚洲日本青草视频在线怡红院| 午夜影院久久久| 国产精品 日产精品 欧美精品| 91麻豆视频网站| 欧美一级生活片| 国产精品久久久久久户外露出| 亚洲成人激情综合网| 国产在线精品国自产拍免费| 色综合色综合色综合色综合色综合 | 亚洲欧美二区三区| 亚洲精品精品亚洲| 精品一区二区三区日韩| av午夜一区麻豆| 日韩欧美自拍偷拍| 亚洲女爱视频在线| 激情综合网av| 亚洲无人区一区| 国产成人精品一区二| 欧美日韩www| 国产精品福利一区二区三区| 日韩av高清在线观看| 99国产精品国产精品毛片| 日韩一区二区精品在线观看| 亚洲免费av网站| 国产在线视频一区二区| 精品视频在线视频| 亚洲欧洲日韩av| 国产一区二区三区四区五区美女| 欧美色图免费看| 亚洲同性gay激情无套| 精品一区二区三区在线视频| 欧美日韩不卡视频| 尤物在线观看一区| 成人小视频免费观看| 精品久久久久久综合日本欧美| 亚洲国产成人av好男人在线观看| 成人免费视频免费观看| 日韩欧美精品三级| 亚洲妇熟xx妇色黄| 在线精品视频免费观看| 国产精品乱码妇女bbbb| 国产成人午夜片在线观看高清观看| 91麻豆精品国产自产在线| 有码一区二区三区| 91丨九色丨国产丨porny| 亚洲国产精品激情在线观看| 亚洲精品一二三| 色综合视频在线观看| av在线不卡电影| 欧美v日韩v国产v| 香蕉av福利精品导航| 欧美在线啊v一区| 日韩一区有码在线| 不卡的av网站| 国产精品污网站| 成人免费视频播放| 国产精品网站在线播放| 国产成人一级电影| 国产午夜精品久久久久久久| 精品一区在线看| 精品日韩99亚洲| 精品一区二区综合| 久久久综合视频| 国产精品888| 久久久久久电影| 国产成人av影院| 国产精品午夜免费| proumb性欧美在线观看| 一区精品在线播放| 色婷婷精品大视频在线蜜桃视频 | 亚洲小少妇裸体bbw| 欧美色偷偷大香| 日本亚洲三级在线| 51精品久久久久久久蜜臀| 男女性色大片免费观看一区二区 | 国产色爱av资源综合区| 国产传媒一区在线| 国产精品国产三级国产aⅴ入口 | 成人av午夜电影| 亚洲伦在线观看| 在线观看亚洲精品视频| 五月婷婷综合在线| 日韩亚洲欧美高清| 国产伦精一区二区三区| 中文字幕乱码日本亚洲一区二区 | 成人av电影在线观看| 亚洲乱码国产乱码精品精小说| 欧美日韩视频第一区| 美女视频黄频大全不卡视频在线播放 | 欧美va在线播放| 国产成人av影院| 亚洲精品写真福利| 3d成人动漫网站| 国产成人av电影免费在线观看| 中文字幕在线不卡国产视频| 在线中文字幕一区二区| 蜜桃视频一区二区三区在线观看| 日韩精品中文字幕一区二区三区| 高清国产午夜精品久久久久久| 亚洲欧美国产三级| 欧美成人女星排行榜| 成人免费毛片a| 亚洲成人资源网| 久久人人爽爽爽人久久久| 色悠悠亚洲一区二区| 麻豆国产欧美日韩综合精品二区| 国产精品网站在线观看| 555www色欧美视频| 99久久久精品免费观看国产蜜| 首页欧美精品中文字幕| 国产欧美精品一区aⅴ影院| 欧美日精品一区视频| 国产成人丝袜美腿| 亚洲成人资源在线| 国产精品美女久久久久久久久| 欧美日韩中文字幕一区二区| 国产成人免费视频网站 | 日本vs亚洲vs韩国一区三区 | 亚洲天天做日日做天天谢日日欢| 91精品国产品国语在线不卡| 成人aa视频在线观看| 青青青伊人色综合久久| 亚洲日本成人在线观看| 欧美电影免费提供在线观看| 色8久久人人97超碰香蕉987| 久久99深爱久久99精品| 亚洲成人你懂的| 成人欧美一区二区三区| 欧美精品一区二区在线观看| 欧美日韩成人一区二区| 99re在线精品| 国产成人自拍高清视频在线免费播放| 亚洲一区二区不卡免费| 国产精品网站在线| 2020国产精品自拍| 91在线精品一区二区三区| 91成人免费在线视频| 中文字幕日本乱码精品影院| 午夜亚洲福利老司机| 中文字幕一区二| 久久久午夜电影| 欧美一级一区二区| 欧美日韩一区二区三区四区| 91视视频在线观看入口直接观看www | 丰满岳乱妇一区二区三区| 国产福利91精品| 国产精品69毛片高清亚洲| 国产·精品毛片| 成人app软件下载大全免费| 91麻豆蜜桃一区二区三区| 99re6这里只有精品视频在线观看| av一区二区久久| 91传媒视频在线播放| 8v天堂国产在线一区二区| 91精品国产一区二区人妖| 日韩视频123|