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

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

?? os_cpu_c.c

?? TC-ucos-philos-詳細注釋.rar 用TC編譯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一区二区三区免费野_久草精品视频
亚洲精品美腿丝袜| 成人av资源网站| 高潮精品一区videoshd| 欧美在线一区二区三区| 国产校园另类小说区| 视频一区免费在线观看| 91网上在线视频| 久久天堂av综合合色蜜桃网| 午夜电影网一区| 91在线视频播放地址| 26uuu亚洲综合色| 日韩—二三区免费观看av| 91蜜桃视频在线| 国产精品每日更新| 国产精品自拍在线| 精品成人免费观看| 蜜臀av性久久久久蜜臀aⅴ| 欧美日韩一区二区三区不卡| 国产精品高清亚洲| 丰满岳乱妇一区二区三区| 欧美大片在线观看一区二区| 日韩成人一级大片| 欧美日韩视频在线第一区| 亚洲激情欧美激情| 色综合久久天天综合网| 欧美国产亚洲另类动漫| 国产精品系列在线播放| 国产欧美日韩卡一| 大白屁股一区二区视频| 国产喂奶挤奶一区二区三区| 韩国一区二区视频| 久久精品亚洲乱码伦伦中文| 国产剧情av麻豆香蕉精品| 久久久亚洲精品一区二区三区| 国产剧情在线观看一区二区| 日韩午夜av电影| 蜜臀av一区二区| 精品裸体舞一区二区三区| 久久精品国产精品亚洲精品| 欧美成人精品福利| 精品无人码麻豆乱码1区2区| 久久久噜噜噜久久人人看| 国产99久久久国产精品免费看 | 亚洲区小说区图片区qvod| 丰满少妇在线播放bd日韩电影| 国产偷国产偷精品高清尤物| 丁香天五香天堂综合| 国产精品免费人成网站| 一本到不卡免费一区二区| 亚洲成a人v欧美综合天堂下载 | 亚洲成人久久影院| 91麻豆精品国产91久久久 | 日本欧美加勒比视频| 日韩欧美视频一区| 国产福利精品导航| 国产精品毛片大码女人| 色婷婷久久久亚洲一区二区三区| 亚洲一区在线视频观看| 欧美成人a视频| 国产99久久久国产精品免费看 | 色www精品视频在线观看| 亚洲成人综合视频| 久久久久久久久久久黄色| 99视频有精品| 蜜臀av性久久久久蜜臀aⅴ四虎 | 欧美一区二区视频观看视频| 国产精品一二三区| 亚洲综合图片区| 欧美sm美女调教| 色综合色综合色综合色综合色综合 | 亚洲男人的天堂一区二区| 91精品国产综合久久久久久久久久| 紧缚奴在线一区二区三区| 亚洲天堂福利av| 欧美岛国在线观看| 色999日韩国产欧美一区二区| 捆绑调教一区二区三区| 亚洲美女一区二区三区| 精品黑人一区二区三区久久| 色一情一伦一子一伦一区| 另类的小说在线视频另类成人小视频在线 | 中文字幕在线观看不卡视频| 欧美日本国产视频| 97久久超碰精品国产| 蜜乳av一区二区三区| 成人免费在线播放视频| 精品久久久久久综合日本欧美| 91丝袜美女网| 国产精品香蕉一区二区三区| 视频一区视频二区中文| 一区二区三区四区在线播放| 国产欧美一区二区三区在线看蜜臀 | kk眼镜猥琐国模调教系列一区二区| 丝袜亚洲另类丝袜在线| 亚洲人成网站影音先锋播放| 久久免费精品国产久精品久久久久| 欧美日韩五月天| 在线观看亚洲精品视频| av电影在线观看不卡| 国产成人午夜精品影院观看视频| 日本aⅴ免费视频一区二区三区| 亚洲精品videosex极品| 日本一区二区三级电影在线观看| 欧美成人综合网站| 91精品国产乱码久久蜜臀| 欧美综合欧美视频| 色欧美日韩亚洲| 91小视频在线免费看| 成人a级免费电影| 成人亚洲一区二区一| 国产精品1区2区3区| 国产综合色产在线精品| 理论电影国产精品| 九九九精品视频| 久久成人av少妇免费| 久久国产婷婷国产香蕉| 日韩高清在线一区| 免费观看30秒视频久久| 麻豆精品一区二区av白丝在线| 午夜精品123| 日本成人超碰在线观看| 美女看a上一区| 久久精品国产99| 国产精品99久久久久久久女警 | 欧美极品另类videosde| 欧美国产日韩一二三区| 自拍偷拍国产精品| 亚洲伊人伊色伊影伊综合网| 日韩专区欧美专区| 精彩视频一区二区三区| 成人免费看黄yyy456| 99精品欧美一区二区蜜桃免费 | 不卡在线观看av| 色先锋资源久久综合| 欧美揉bbbbb揉bbbbb| 欧美一区二区视频在线观看| 精品久久久网站| 日韩一区欧美小说| 午夜精品久久久久久久99樱桃| 日本欧美加勒比视频| 国产精品亚洲视频| 色诱视频网站一区| 欧美二区三区91| 26uuu国产日韩综合| 亚洲狼人国产精品| 日产国产欧美视频一区精品| 国产精品一区二区在线播放 | 欧美色综合网站| 日韩美女一区二区三区四区| 国产日韩欧美制服另类| 亚洲自拍偷拍九九九| 九九视频精品免费| 色哟哟欧美精品| 欧美精品一区二区三| 亚洲精品中文在线观看| 久久精品国产一区二区三| 99久久99久久精品免费看蜜桃| 欧美色偷偷大香| 久久看人人爽人人| 亚洲国产va精品久久久不卡综合| 国产综合久久久久久久久久久久| 色菇凉天天综合网| 26uuu另类欧美| 亚洲6080在线| 99精品久久只有精品| 久久影院午夜片一区| 亚洲成av人片一区二区梦乃| 丰满亚洲少妇av| 日韩午夜激情电影| 亚洲综合视频在线观看| 夫妻av一区二区| 337p日本欧洲亚洲大胆色噜噜| 一二三区精品福利视频| 成人av电影在线| 精品久久久久久久久久久久包黑料| 一区二区免费在线| 成人综合在线观看| 精品国产一二三| 性久久久久久久| 91精品1区2区| 亚洲人成精品久久久久久| 国产成人精品三级| 亚洲精品在线电影| 麻豆成人91精品二区三区| 欧美偷拍一区二区| 亚洲狠狠丁香婷婷综合久久久| 国产高清无密码一区二区三区| 日韩精品一区二区三区中文精品| 亚洲午夜在线电影| 欧美性色欧美a在线播放| 亚洲男同性视频| 91免费视频大全| 亚洲欧美日韩久久| 91网站黄www| 亚洲伦理在线精品| 91久久精品网| 亚洲永久免费av| 欧美亚洲高清一区二区三区不卡| 亚洲欧美激情插| 91老司机福利 在线|