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

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

?? os_cpu_c.c

?? 這個就是所謂ucos的33個例子
?? 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人在线观看导航| 国产亚洲欧美日韩在线一区| 中文字幕一区av| 丝袜诱惑制服诱惑色一区在线观看| 精品系列免费在线观看| 国产精品自拍一区| 在线免费观看日本欧美| 日韩午夜在线影院| 国产精品电影一区二区三区| 免费在线视频一区| 国产精品一区二区视频| 欧美日韩视频第一区| 久久久久久免费毛片精品| 亚洲图片欧美色图| 国产中文字幕精品| 在线视频中文字幕一区二区| 一本久久a久久精品亚洲| 精品国产污污免费网站入口| 怡红院av一区二区三区| 国产一区二区三区最好精华液| 色香蕉成人二区免费| 欧美电影一区二区三区| 亚洲色图.com| 国产精品一区二区久久不卡| 欧美日韩欧美一区二区| 国产精品妹子av| 日本欧美韩国一区三区| 岛国一区二区在线观看| 精品欧美黑人一区二区三区| 亚洲中国最大av网站| 国产白丝精品91爽爽久久| 日韩精品一区二区三区在线观看 | 色八戒一区二区三区| 91色综合久久久久婷婷| 久久综合给合久久狠狠狠97色69| 亚洲国产精品t66y| 久久成人久久爱| 3d成人动漫网站| 午夜精品久久久久久久99水蜜桃| 91视频一区二区三区| 中文字幕免费不卡在线| 国产酒店精品激情| 久久在线观看免费| 国产在线一区二区| 欧美在线啊v一区| 一区二区三区四区中文字幕| 99精品久久久久久| 亚洲欧洲日韩av| 成人黄色网址在线观看| 国产精品水嫩水嫩| 成人激情午夜影院| 18成人在线观看| 91视频在线看| 亚洲美腿欧美偷拍| 92国产精品观看| 亚洲免费色视频| 欧美日韩综合在线免费观看| 亚洲风情在线资源站| 91精品欧美久久久久久动漫| 亚洲一区视频在线观看视频| caoporen国产精品视频| 亚洲欧洲国产日韩| 色av一区二区| 免费久久99精品国产| 久久综合色综合88| 蜜桃一区二区三区在线观看| 欧美大黄免费观看| 国产一区二区三区四| 国产精品每日更新在线播放网址 | 欧美精品一区二区久久婷婷 | 欧美精品一区二区久久婷婷| 国产成人在线观看| 国产精品美女久久久久aⅴ| 在线亚洲免费视频| 毛片基地黄久久久久久天堂| 久久亚洲综合色一区二区三区| 国产精品一区2区| 亚洲另类一区二区| 欧美一区二区福利视频| 国产成人在线色| 亚洲一区成人在线| 久久伊99综合婷婷久久伊| av福利精品导航| 亚洲午夜久久久久| 欧美激情资源网| 欧美性xxxxxxxx| 狠狠久久亚洲欧美| 一区二区日韩电影| 久久综合丝袜日本网| 91久久线看在观草草青青| 久久97超碰国产精品超碰| 亚洲婷婷综合色高清在线| 欧美狂野另类xxxxoooo| 国产精品18久久久久久vr| 久久中文字幕电影| 色琪琪一区二区三区亚洲区| 高清国产午夜精品久久久久久| 蜜桃精品视频在线| 五月天国产精品| 亚洲一区二区美女| 亚洲六月丁香色婷婷综合久久 | 香蕉加勒比综合久久| 亚洲欧美激情视频在线观看一区二区三区 | 欧美日韩国产一级| 欧美性淫爽ww久久久久无| 99久久婷婷国产精品综合| 懂色中文一区二区在线播放| 国产美女在线精品| 国产一区二区三区在线看麻豆| 狠狠色丁香婷综合久久| 美女任你摸久久| 激情五月婷婷综合网| 激情综合网激情| 国产乱码一区二区三区| 国产精品影音先锋| 国产成人三级在线观看| 成人永久看片免费视频天堂| a美女胸又www黄视频久久| 91色九色蝌蚪| 欧美性色aⅴ视频一区日韩精品| 欧美视频在线一区二区三区| 欧美日韩大陆一区二区| 69p69国产精品| 久久久久一区二区三区四区| 久久精品人人做人人爽97| 中文字幕一区二区三| 亚洲最新在线观看| 天天av天天翘天天综合网| 免费在线观看一区二区三区| 国产综合成人久久大片91| 国产成人免费在线观看| 色婷婷综合久色| 欧美精品第一页| 久久亚洲二区三区| 亚洲欧洲www| 午夜精品久久久久久久蜜桃app| 免费视频一区二区| 成人免费视频app| 欧美性感一区二区三区| 欧美大黄免费观看| 自拍偷拍亚洲欧美日韩| 日韩精品亚洲专区| 成人免费看片app下载| 欧美色成人综合| 久久久电影一区二区三区| 亚洲精品老司机| 久久成人久久爱| 欧美性受xxxx黑人xyx性爽| 欧美精品一区二区久久婷婷| 亚洲猫色日本管| 麻豆精品视频在线| 色猫猫国产区一区二在线视频| 日韩区在线观看| 中文字幕一区二区三| 另类小说欧美激情| 91玉足脚交白嫩脚丫在线播放| 欧美一区2区视频在线观看| 国产精品国产三级国产aⅴ入口| 亚洲h动漫在线| 不卡av在线网| 精品国产91久久久久久久妲己| 亚洲精品自拍动漫在线| 国产麻豆精品theporn| 678五月天丁香亚洲综合网| 亚洲色图在线看| 国产suv精品一区二区883| 91精品国产综合久久久久久久久久| 中文在线资源观看网站视频免费不卡| 午夜av一区二区| 91丝袜美女网| 欧美韩国日本不卡| 九九九久久久精品| 欧美精品 日韩| 夜夜嗨av一区二区三区四季av| 不卡一区中文字幕| 久久久99精品久久| 久久国产尿小便嘘嘘尿| 337p亚洲精品色噜噜| 亚洲狠狠爱一区二区三区| 91丨porny丨在线| 国产精品日韩成人| 丁香另类激情小说| 国产日本欧美一区二区| 毛片av一区二区| 精品少妇一区二区三区日产乱码 | 男人的天堂亚洲一区| 欧美久久婷婷综合色| 一区二区三区在线视频免费| 成人午夜在线播放| 久久久久国产精品厨房| 国产原创一区二区| 精品福利视频一区二区三区| 蜜桃视频一区二区三区在线观看| 欧美高清你懂得| 青青国产91久久久久久| 日韩欧美激情在线| 另类调教123区| wwww国产精品欧美|