亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产风韵犹存在线视精品| 欧美日韩久久久一区| 欧美三区在线视频| 久久精品夜色噜噜亚洲aⅴ| 亚洲精品菠萝久久久久久久| 久久国产综合精品| 欧美自拍偷拍一区| 国产精品国产三级国产普通话99| 石原莉奈在线亚洲二区| 色综合天天性综合| 久久久久99精品一区| 蜜臀av一区二区| 欧美亚洲动漫精品| 成人免费小视频| 国产成人精品一区二区三区网站观看| 欧美精品国产精品| 亚洲动漫第一页| 91网站最新地址| 国产精品二三区| 国产成人亚洲综合a∨婷婷图片| 91精品国产综合久久久久久久久久 | 久久日韩粉嫩一区二区三区| 亚洲va在线va天堂| 97久久精品人人澡人人爽| 国产无遮挡一区二区三区毛片日本| 三级不卡在线观看| 欧美日韩精品电影| 亚洲综合一区二区| 欧日韩精品视频| 亚洲午夜一二三区视频| 欧美日韩一区在线| 午夜精品福利一区二区三区蜜桃| 欧美最新大片在线看| 亚洲国产一区二区三区| 欧美性感一区二区三区| 亚洲香肠在线观看| 欧美老肥妇做.爰bbww| 视频在线观看91| 精品欧美乱码久久久久久 | 国产激情视频一区二区三区欧美 | 日本vs亚洲vs韩国一区三区二区| 欧美老肥妇做.爰bbww视频| 日韩av中文字幕一区二区 | 91丝袜美女网| 亚洲激情自拍视频| 欧美精品v国产精品v日韩精品| 日韩成人精品在线观看| 欧美大片国产精品| 国产精品一区二区91| 国产精品视频线看| 色噜噜狠狠成人网p站| 亚洲国产日日夜夜| 精品国产一区二区亚洲人成毛片| 国产在线一区观看| 亚洲欧美激情视频在线观看一区二区三区| 91丨九色丨蝌蚪富婆spa| 亚洲国产日韩一级| 日韩欧美高清在线| 成a人片国产精品| 亚洲国产成人精品视频| 日韩欧美激情一区| 懂色av中文字幕一区二区三区| 国产精品毛片大码女人| 在线精品亚洲一区二区不卡| 日本中文字幕不卡| 中文字幕一区二| 欧美精品亚洲一区二区在线播放| 国产一区二区日韩精品| 亚洲黄色小说网站| 欧美精品一区二区久久久| 99久久综合精品| 美女视频网站久久| 亚洲精品一二三| 26uuu久久综合| 欧美婷婷六月丁香综合色| 精品一区二区久久久| 一区二区不卡在线视频 午夜欧美不卡在 | 欧美大片日本大片免费观看| av一二三不卡影片| 日日夜夜免费精品| 国产精品美女一区二区三区| 制服丝袜国产精品| 一本大道久久a久久精品综合 | 亚洲国产一区视频| 亚洲国产精品精华液ab| 欧美一区二区三区啪啪| 色综合视频在线观看| 国产大陆精品国产| 秋霞影院一区二区| 一区二区三区精品在线观看| 久久久久久久久久久久久久久99| 欧美福利视频一区| 色国产综合视频| 懂色一区二区三区免费观看| 另类小说视频一区二区| 香蕉影视欧美成人| 亚洲人吸女人奶水| 日本一区二区三区四区在线视频| 3d动漫精品啪啪一区二区竹菊| 99精品久久免费看蜜臀剧情介绍 | 日韩av成人高清| 亚洲六月丁香色婷婷综合久久| 国产午夜一区二区三区| 精品免费99久久| 欧美一区在线视频| 欧美嫩在线观看| 欧美日韩在线播放| 欧美性大战久久久久久久| 97久久久精品综合88久久| 不卡一二三区首页| 福利电影一区二区| 99久久夜色精品国产网站| 国产成人免费在线观看不卡| 国产一区二区成人久久免费影院| 精品一区二区三区不卡| 激情成人午夜视频| 精品中文字幕一区二区| 美国av一区二区| 免费xxxx性欧美18vr| 日韩va亚洲va欧美va久久| 日本免费新一区视频| 日本免费新一区视频| 激情综合亚洲精品| 狠狠色综合播放一区二区| 国产黑丝在线一区二区三区| 国产69精品一区二区亚洲孕妇| 国产高清久久久久| 成人精品视频一区二区三区尤物| 成人一区在线看| 91社区在线播放| 欧美在线观看视频一区二区| 欧美人妇做爰xxxⅹ性高电影| 欧美日本高清视频在线观看| 日韩一区二区高清| 久久久久久一二三区| 国产精品全国免费观看高清 | 国产精品色噜噜| 亚洲色图在线播放| 亚洲1区2区3区视频| 美女视频一区二区三区| 国产91精品一区二区| 成人午夜电影久久影院| 99视频国产精品| 欧美丰满一区二区免费视频| 精品福利在线导航| 国产精品成人免费精品自在线观看 | 欧美成人一区二区三区片免费| 国产午夜精品一区二区三区视频| 国产精品国产三级国产aⅴ入口 | 欧美在线观看一二区| 日韩亚洲欧美综合| 国产清纯白嫩初高生在线观看91 | 欧美性做爰猛烈叫床潮| 欧美电影免费观看完整版| 中文字幕亚洲欧美在线不卡| 亚洲国产一区二区三区 | 中文字幕欧美区| 午夜不卡av在线| 国产jizzjizz一区二区| 在线播放中文一区| 国产精品乱人伦| 免费人成在线不卡| 色综合色综合色综合| 久久久久久久久久电影| 亚洲国产精品久久久久秋霞影院| 国产一区二区三区电影在线观看 | 日本乱码高清不卡字幕| 日韩欧美一级二级| 亚洲在线观看免费视频| 成人亚洲一区二区一| 91精品国产一区二区| 亚洲人成精品久久久久久| 国产美女主播视频一区| 欧美日韩一区二区不卡| 国产精品高潮久久久久无| 激情综合一区二区三区| 91精品国产入口| 天天av天天翘天天综合网色鬼国产 | 一区二区三区四区高清精品免费观看 | 麻豆91免费观看| 欧美日韩一区 二区 三区 久久精品| 亚洲国产激情av| 国产精品一区二区x88av| 日韩久久久久久| 免费黄网站欧美| 69成人精品免费视频| 亚洲一区国产视频| 在线观看av不卡| 亚洲黄一区二区三区| 色哟哟一区二区在线观看| 国产精品久久久久久久久快鸭| 国产精品18久久久久久久久久久久| 日韩天堂在线观看| 日韩av一级电影| 91精品国产综合久久久久久久| 亚洲国产成人高清精品| 欧美日韩亚州综合| 日韩av中文字幕一区二区| 欧美一区二区日韩| 免费在线观看视频一区|