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

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

?? os_cpu_c.c

?? ucos flashlite,從中可以學到很我flash的優化技巧.
?? C
字號:
/*
*********************************************************************************************************
*                                               uC/OS-II
*                                         The Real-Time Kernel
*
*                         (c) Copyright 1992-2003, 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 <ucos_ii.h>

INT8U  const  OSTickDOSCtrReload = (INT8U)((FP32)OS_TICKS_PER_SEC / (FP32)18.20648 + (FP32)0.5);

/*
*********************************************************************************************************
*                                       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
*
*              p_arg         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 *p_arg, 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(p_arg);         /* Simulate call to function with argument                 */
    *stk-- = (INT16U)FP_OFF(p_arg);         
    *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               */
                                                      /* Copy FP emulation memory to task's stack      */
    OS_MemCopy((INT8U *)*ppbos, (INT8U *)MK_FP(_SS, 0), 384u);          
    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, 384u);            /* Determine new bottom-of-stack                 */
    bytes    = bytes - 384u;
    *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) && (OS_TASK_SW_HOOK_EN > 0)
void  OSTaskSwHook (void)
{
}
#endif

/*
*********************************************************************************************************
*                                           OS_TCBInit() 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) && (OS_TIME_TICK_HOOK_EN > 0)
void  OSTimeTickHook (void)
{
}
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
高潮精品一区videoshd| 亚洲欧洲av色图| 精品免费国产二区三区| 久久免费看少妇高潮| 久久久久久久精| 国产精品天干天干在线综合| 亚洲欧洲成人自拍| 亚洲一区二区三区四区在线观看| 亚洲午夜国产一区99re久久| 一区二区三区在线免费视频| 亚洲成a人片在线不卡一二三区| 日本伊人午夜精品| 国产一区在线精品| 91在线视频播放地址| 91久久一区二区| 51久久夜色精品国产麻豆| 欧美一级欧美三级在线观看| 2022国产精品视频| 国产精品久久福利| 国产精品国产自产拍在线| 亚洲国产精品一区二区www在线| 日本aⅴ亚洲精品中文乱码| 国产精品一区在线观看你懂的| 成人av手机在线观看| 不卡视频在线看| 欧美日韩一区二区在线观看视频 | 欧美性猛交xxxxxx富婆| 欧美精品久久一区| 久久久久综合网| 亚洲免费观看高清| 日韩激情在线观看| 欧美日本视频在线| 亚洲精品一区二区三区精华液 | 人人狠狠综合久久亚洲| 国产尤物一区二区在线| 色香蕉久久蜜桃| 日韩欧美一区二区在线视频| 欧美精品在线视频| 国产日本一区二区| 亚洲国产一区二区a毛片| 看国产成人h片视频| www.成人网.com| 7777精品伊人久久久大香线蕉超级流畅| 欧美不卡视频一区| 亚洲靠逼com| 国产美女精品人人做人人爽| 欧美午夜一区二区三区| 久久免费的精品国产v∧| 亚洲综合色视频| 韩国av一区二区三区四区| 欧美天天综合网| 国产三级欧美三级| 亚洲高清一区二区三区| 成人av在线资源网| 欧美精品一区二区三区一线天视频| 亚洲天堂久久久久久久| 日本午夜一本久久久综合| 成人ar影院免费观看视频| 欧美一区二区在线播放| 一区二区三区在线看| 成人一区二区三区视频在线观看 | 欧美国产国产综合| 日韩国产高清影视| 欧美性大战xxxxx久久久| 亚洲女爱视频在线| 99国产欧美另类久久久精品| 国产精品每日更新在线播放网址| 国产成人av一区二区三区在线 | 精品在线一区二区三区| 日韩欧美一区二区免费| 久久精品国产99久久6| 日韩情涩欧美日韩视频| 久久99精品网久久| 久久精品亚洲精品国产欧美kt∨| 国产乱人伦偷精品视频不卡| 久久亚洲私人国产精品va媚药| 精品一区二区精品| 久久精品欧美日韩精品| 国产91丝袜在线播放0| 国产欧美日本一区二区三区| 丰满放荡岳乱妇91ww| 成人免费一区二区三区在线观看| 成人精品免费网站| 亚洲欧美另类综合偷拍| 欧美综合色免费| 亚洲国产欧美在线| 日韩写真欧美这视频| 久久99热狠狠色一区二区| 久久久99精品免费观看不卡| 国产成人精品亚洲777人妖 | 色狠狠综合天天综合综合| 樱花影视一区二区| 欧美日韩成人高清| 美女爽到高潮91| 久久久久久久久久久久久久久99| 成人免费毛片a| 亚洲一区在线视频| 欧美一区二区三区免费在线看| 另类小说综合欧美亚洲| 国产午夜久久久久| 91原创在线视频| 亚洲成av人片在线| ww亚洲ww在线观看国产| 不卡av在线网| 亚洲午夜免费电影| 精品国产第一区二区三区观看体验 | 91性感美女视频| 亚洲第一在线综合网站| 日韩精品一区二区三区三区免费| 成人精品在线视频观看| 一个色妞综合视频在线观看| 日韩一级免费观看| 懂色av一区二区在线播放| 亚洲自拍与偷拍| 精品国产123| 91看片淫黄大片一级在线观看| 香蕉加勒比综合久久 | 99久久综合国产精品| 亚洲成人自拍偷拍| 久久婷婷综合激情| 色噜噜狠狠成人中文综合| 蜜桃91丨九色丨蝌蚪91桃色| 一区在线观看免费| 91精品国产乱| 97se亚洲国产综合在线| 久久精品99国产精品| 亚洲欧美经典视频| 精品国产免费一区二区三区香蕉| 激情文学综合网| 亚洲愉拍自拍另类高清精品| 久久日一线二线三线suv| 91久久精品日日躁夜夜躁欧美| 另类小说综合欧美亚洲| 夜夜精品浪潮av一区二区三区| 国产亚洲综合性久久久影院| 欧美系列一区二区| 国产不卡视频一区| 美女被吸乳得到大胸91| 夜夜操天天操亚洲| 久久噜噜亚洲综合| 91麻豆精品国产91久久久| 成人免费高清在线| 麻豆精品久久精品色综合| 亚洲永久精品大片| 国产精品久久久久桃色tv| 欧美一区二区三区色| 在线观看免费成人| 成人国产电影网| 精品一区二区三区免费视频| 亚洲二区在线视频| 亚洲人成网站精品片在线观看| 国产欧美一区二区三区在线看蜜臀| 欧美一区二区三区性视频| 色久综合一二码| 91影院在线观看| 国产91对白在线观看九色| 久久精品72免费观看| 日韩av电影免费观看高清完整版在线观看| 亚洲精品久久7777| 亚洲欧洲成人自拍| 国产精品乱码久久久久久| 久久精品亚洲国产奇米99| 精品日韩在线观看| 日韩欧美中文字幕精品| 欧美久久一二区| 欧美性受xxxx| 欧美专区日韩专区| 欧美在线一区二区三区| 91日韩精品一区| 成人精品免费网站| 不卡影院免费观看| 99视频在线精品| 99精品视频一区| 99亚偷拍自图区亚洲| 99精品久久99久久久久| 成人动漫av在线| 99热国产精品| 91日韩精品一区| 在线日韩一区二区| 色偷偷一区二区三区| 91污片在线观看| 色综合久久中文字幕综合网| 91视频一区二区三区| 色综合av在线| 91精彩视频在线| 在线视频欧美精品| 欧美色图第一页| 欧美精品自拍偷拍| 欧美成人a在线| 久久久久久久久一| 中文字幕不卡的av| 综合av第一页| 亚洲小说欧美激情另类| 亚洲伊人伊色伊影伊综合网| 亚洲18色成人| 美女国产一区二区| 国产精品99久久久久久久vr| 成人黄色小视频| 日本精品一级二级| 欧美一区二区在线免费观看|