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

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

?? os_cpu_c.c

?? 任務一 任務管理 任務二 優先級天花板 任務三 哲學家就餐 任務四 消息隊列 任務五 時鐘中斷
?? 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 "C:\SOFTWARE\uCOS-II\philosophers\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一区二区三区免费野_久草精品视频
久久超级碰视频| 成人av中文字幕| 午夜精品视频在线观看| 亚洲国产精品人人做人人爽| 日韩美女啊v在线免费观看| 久久久久久亚洲综合影院红桃| 91精品一区二区三区久久久久久| 国产成人久久精品77777最新版本| 免费成人美女在线观看.| 亚洲成人综合网站| 亚洲综合色视频| 久久精品夜夜夜夜久久| 欧美激情中文字幕| 国产精品色哟哟| 中文字幕成人网| 在线成人免费视频| 欧美mv日韩mv国产网站| 日韩精品一区二区三区四区| 91麻豆精品国产91久久久| 337p粉嫩大胆噜噜噜噜噜91av| 精品久久久久久久久久久院品网| 精品国偷自产国产一区| 日韩欧美视频一区| 精品国产成人在线影院| 欧美精品一区二区高清在线观看| 国产亚洲自拍一区| 国产精品拍天天在线| 国产精品不卡一区二区三区| 精品99久久久久久| 国产拍欧美日韩视频二区| 一区在线中文字幕| 亚洲国产中文字幕在线视频综合| 亚洲成人综合视频| 国产精品一二一区| 99久久婷婷国产综合精品电影| 色综合久久久久网| kk眼镜猥琐国模调教系列一区二区| 欧美在线播放高清精品| 欧美日韩情趣电影| 日韩你懂的电影在线观看| 3d动漫精品啪啪1区2区免费| 欧美大尺度电影在线| 国产目拍亚洲精品99久久精品| 亚洲女与黑人做爰| 激情综合网av| 99久久免费视频.com| 欧美日韩高清在线| 久久久www成人免费无遮挡大片| 国产精品欧美一区二区三区| 亚洲永久精品国产| 极品销魂美女一区二区三区| 91福利国产成人精品照片| 91精品视频网| 国产精品福利一区二区| 一区二区三区在线免费播放| 日本va欧美va瓶| 成人小视频在线观看| 欧美在线你懂得| 国产精品五月天| 丝袜美腿亚洲综合| 国产传媒日韩欧美成人| 大桥未久av一区二区三区中文| 欧美日韩午夜影院| 国产日韩亚洲欧美综合| 亚洲高清免费视频| 91毛片在线观看| 日韩欧美黄色影院| 亚洲精品久久7777| 久久er99热精品一区二区| 日韩av网站在线观看| 狠狠狠色丁香婷婷综合激情| 蜜桃91丨九色丨蝌蚪91桃色| 色综合欧美在线视频区| 精品国产乱码久久久久久浪潮| 国产精品第一页第二页第三页| 日本美女视频一区二区| 91麻豆自制传媒国产之光| 精品国产凹凸成av人导航| 亚洲欧美另类久久久精品2019| 国产在线不卡视频| 91精品福利在线一区二区三区| 亚洲免费在线视频| 国产传媒一区在线| 欧洲精品在线观看| 亚洲精品欧美激情| 国产成人午夜电影网| 在线观看区一区二| 中文字幕二三区不卡| 国产成人三级在线观看| 日韩欧美你懂的| 亚洲123区在线观看| 欧美私人免费视频| 国产乱码一区二区三区| 欧美午夜不卡在线观看免费| 亚洲人成精品久久久久| 国产成人在线视频网址| 精品久久一二三区| 日韩国产一区二| 欧美专区在线观看一区| 日韩一级欧美一级| 美腿丝袜一区二区三区| 欧美视频精品在线| 亚洲女同一区二区| 在线免费精品视频| 亚洲免费伊人电影| 成人黄色777网| 久久精品夜色噜噜亚洲aⅴ| 国产成人精品亚洲日本在线桃色| 精品蜜桃在线看| 乱一区二区av| 8v天堂国产在线一区二区| 亚洲国产视频网站| 精品1区2区3区| 天天综合网天天综合色| 欧美日韩你懂得| 污片在线观看一区二区| 欧美在线观看视频在线| 亚洲制服丝袜一区| 欧美日韩精品一二三区| 丝袜脚交一区二区| 欧美一区二区三区视频| 色先锋资源久久综合| 99热这里都是精品| 中文字幕永久在线不卡| 成人免费精品视频| 国产精品欧美一区喷水| 国产91在线观看| 亚洲精品国产视频| 欧美性做爰猛烈叫床潮| 日韩黄色免费电影| 日韩一区二区三区在线观看| 国产91精品一区二区| 亚洲精品久久7777| 日韩欧美二区三区| 成人av在线资源网| 日韩精品欧美成人高清一区二区| 欧美xxxx老人做受| 99精品黄色片免费大全| 日韩国产在线观看一区| 国产亚洲成aⅴ人片在线观看 | 国产69精品一区二区亚洲孕妇| 成人免费小视频| 8x8x8国产精品| 成人做爰69片免费看网站| 亚洲一区二区视频在线观看| 精品国一区二区三区| 色婷婷综合久久久中文字幕| 久久成人免费日本黄色| 亚洲卡通欧美制服中文| 精品久久久久久久久久久久久久久久久| aaa欧美色吧激情视频| 亚洲成人动漫在线免费观看| 欧美刺激午夜性久久久久久久| 成人av免费在线| 美女诱惑一区二区| 亚洲色大成网站www久久九九| 日韩欧美综合一区| 91精品国产综合久久精品麻豆 | 亚洲精品一区二区三区在线观看| 91性感美女视频| 精品一区二区影视| 亚洲午夜羞羞片| 国产精品天天摸av网| 日韩欧美激情在线| 欧美在线看片a免费观看| 粉嫩av一区二区三区粉嫩| 免费xxxx性欧美18vr| 亚洲免费观看高清在线观看| 久久精品亚洲国产奇米99| 欧美日韩免费一区二区三区| 丁香网亚洲国际| 精品一区二区三区视频| 午夜精品福利一区二区三区av| 国产精品久久久久久久第一福利 | 日韩和的一区二区| 亚洲免费看黄网站| 国产精品欧美极品| 久久久久久久久久久黄色| 这里只有精品99re| 在线视频欧美区| 成人18视频日本| 国产成人av影院| 国产自产视频一区二区三区| 天堂久久久久va久久久久| 日韩一区二区高清| 99re这里都是精品| 成人午夜av电影| 国产精品一区二区三区网站| 美女在线视频一区| 奇米在线7777在线精品| 亚洲午夜av在线| 亚洲欧洲综合另类| 亚洲色大成网站www久久九九| 国产欧美一区二区三区沐欲| 久久免费视频一区| 国产日韩精品一区二区三区| 久久九九国产精品| 国产视频视频一区| 中文av一区特黄| 中文字幕av一区二区三区|