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

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

?? os_cpu_c.c

?? 基于UCOS2開源的程序
?? 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一区二区三区免费野_久草精品视频
精品国产1区2区3区| 天天亚洲美女在线视频| 国产91精品精华液一区二区三区 | 亚洲国产美国国产综合一区二区| 国产成人免费xxxxxxxx| 国产精品系列在线| 色综合天天综合色综合av | 国产精品美女久久久久久久| 福利视频网站一区二区三区| 国产精品卡一卡二| 色婷婷精品大视频在线蜜桃视频| 国产亚洲成aⅴ人片在线观看| 美女视频黄a大片欧美| 91成人免费网站| 亚洲男女毛片无遮挡| 在线看国产日韩| 亚洲自拍都市欧美小说| 欧美自拍丝袜亚洲| 婷婷久久综合九色国产成人| 欧美视频在线一区二区三区 | 亚洲视频图片小说| 91碰在线视频| 亚洲成人动漫精品| 欧美一区二区精品久久911| 免费精品视频在线| 久久这里只有精品视频网| 国产精品一区二区三区网站| 国产日韩欧美电影| 91在线观看下载| 亚洲第一电影网| 欧美一级免费观看| 国产一区二区美女诱惑| 国产精品不卡一区| 在线观看中文字幕不卡| 视频一区欧美精品| 久久品道一品道久久精品| 成人中文字幕在线| 亚洲午夜精品网| 欧美xxxxxxxxx| 粉嫩aⅴ一区二区三区四区| 亚洲欧美激情在线| 91精品麻豆日日躁夜夜躁| 国产在线一区观看| 亚洲欧美国产三级| 日韩欧美中文一区二区| 久久99久久久欧美国产| 国产精品久久福利| 91精品办公室少妇高潮对白| 久久99国产精品尤物| 久久免费视频色| 在线观看av不卡| 国产精品一级二级三级| 欧美激情综合五月色丁香小说| 色婷婷久久99综合精品jk白丝| 日韩av一区二区在线影视| 久久一日本道色综合| 日本高清不卡一区| 韩国女主播一区二区三区| 亚洲人成精品久久久久| 精品美女一区二区| 91久久精品国产91性色tv | 在线观看一区二区精品视频| 精品亚洲aⅴ乱码一区二区三区| 亚洲丝袜美腿综合| 久久久天堂av| 欧美日韩三级视频| av男人天堂一区| 久久99在线观看| 一区二区三区在线免费视频| 欧美mv日韩mv国产网站app| 欧美亚洲高清一区| 狠狠色丁香婷婷综合| 亚洲一二三四区不卡| 久久精品免视看| 日韩免费看的电影| 欧美日韩精品一区视频| 成人性生交大片免费看视频在线 | 国产99久久精品| 国产日韩欧美一区二区三区综合| 视频一区二区欧美| 欧美精品一区二区三区久久久| 日韩一区二区三区四区五区六区| 国产91在线观看丝袜| 水野朝阳av一区二区三区| 亚洲人被黑人高潮完整版| 337p粉嫩大胆色噜噜噜噜亚洲| 在线电影欧美成精品| 色综合久久88色综合天天免费| 国产最新精品免费| 久久66热偷产精品| 青青青爽久久午夜综合久久午夜| 亚洲精品五月天| 成人欧美一区二区三区黑人麻豆| 久久久欧美精品sm网站| 日韩一级片在线观看| 欧美日韩精品一区视频| 在线一区二区三区四区五区| 91碰在线视频| 精品噜噜噜噜久久久久久久久试看| 在线观看91视频| 欧美三区在线视频| 欧美撒尿777hd撒尿| 欧美三级日韩在线| 欧美日韩久久一区| 欧美体内she精高潮| 一本到三区不卡视频| 91在线视频18| 在线免费视频一区二区| 色婷婷国产精品| 91麻豆免费观看| 91麻豆6部合集magnet| 日本精品一区二区三区高清| 91蝌蚪porny九色| 欧美日韩精品电影| 91精品国产手机| 欧美成人一区二区| 久久精品视频在线免费观看| 国产视频一区在线观看| 国产精品国产三级国产aⅴ原创| 亚洲国产精品av| 2020国产精品久久精品美国| 久久精品网站免费观看| 亚洲丝袜精品丝袜在线| 91视频在线观看免费| 午夜精品在线看| 亚洲成人777| 日韩高清一区二区| 久久草av在线| 国产精品小仙女| 99国产精品久久久久久久久久 | 国产一区二区三区精品欧美日韩一区二区三区 | 婷婷丁香久久五月婷婷| 麻豆精品在线播放| 成人av电影免费在线播放| 欧美性生活影院| 欧美成人三级在线| 中文字幕一区二区三区在线不卡| 一区av在线播放| 国产一区免费电影| 色综合天天综合狠狠| 日韩一区二区三区精品视频| 国产欧美日韩综合| 亚洲免费毛片网站| 波多野结衣欧美| 欧美日韩国产高清一区| 一本久道中文字幕精品亚洲嫩| 91丨九色丨尤物| 日韩专区一卡二卡| 国产成人在线视频免费播放| 91伊人久久大香线蕉| 色哦色哦哦色天天综合| 欧美一级精品在线| 樱桃国产成人精品视频| 国产精品一区专区| 欧美日韩专区在线| 国产精品少妇自拍| 日韩成人伦理电影在线观看| 不卡的av网站| 久久午夜免费电影| 亚洲午夜精品在线| 不卡视频免费播放| 久久这里只精品最新地址| 亚洲h在线观看| 99久久夜色精品国产网站| 精品美女一区二区三区| 亚洲6080在线| 日本乱码高清不卡字幕| 久久先锋影音av鲁色资源网| 91精品黄色片免费大全| 日本不卡在线视频| 94色蜜桃网一区二区三区| 一区二区三区av电影| 久久99精品国产| 欧美日韩国产综合视频在线观看 | 久久激情五月激情| 欧美另类变人与禽xxxxx| 玉米视频成人免费看| 成熟亚洲日本毛茸茸凸凹| 国产亚洲欧美一区在线观看| 日韩精品欧美成人高清一区二区| 色欧美日韩亚洲| 亚洲女同一区二区| 国产综合久久久久影院| 欧美一区二区三区视频免费播放 | 欧美主播一区二区三区美女| 亚洲欧洲av在线| 99在线精品免费| 国产精品不卡视频| 99精品国产视频| 亚洲欧美综合色| 色呦呦日韩精品| 亚洲美腿欧美偷拍| 色偷偷久久人人79超碰人人澡| 91精品国产色综合久久不卡电影 | 亚洲摸摸操操av| 欧美激情中文字幕一区二区| 国产精品色婷婷| 美女脱光内衣内裤视频久久网站| 欧美午夜不卡视频| 亚洲一二三四在线|