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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? os_cpu_c.c

?? 嵌入式操作系統(tǒng)源碼
?? C
字號:
/*
*********************************************************************************************************
*                                               uC/OS-II
*                                         The Real-Time Kernel
*
*                         (c) Copyright 1992-2001, 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
*********************************************************************************************************
*/
#include  "includes.h"
#include  <string.h>


#define  OS_CPU_GLOBALS

#define FP_OFF(fp)((unsigned)(fp))
#define FP_SEG(fp)((unsigned)((unsigned long)(fp) >> 16))

/*
*********************************************************************************************************
*                                        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!
*********************************************************************************************************
*/

void TaskBucket()
{
	while (1)
		;
}



OS_STK *OSTaskStkInit (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt)
{
#if 0
    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);

#endif

	OS_STK*	stk;

	stk = (OS_STK *) ptos;			// Load stack pointer

	*--stk = (INT32U) pdata;		// Simulate a function call (to pass the parameter)
	*--stk = (INT32U) TaskBucket;			// Return address in case the task exits.

	*--stk = 0x00000202;			// Eflags (interrupt flag enabled)
	*--stk = 0x18;					// CS: define in TA
	*--stk = (INT32U) task;			// Entry point

	*--stk = 0;						// EAX
	*--stk = 0;						// ECX
	*--stk = 0;						// EDX
	*--stk = 0;						// EBX
	*--stk = 0;						// ESP (unused)
	*--stk = 0;						// EBP
	*--stk = 0;						// ESI
	*--stk = 0;						// EDI

    return 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 'pseudoregister' 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*/
#if OS_CPU_HOOKS_EN
/*
*********************************************************************************************************
*                                       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_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_VERSION > 203
void OSInitHookEnd (void)
{
}
#endif


/*
*********************************************************************************************************
*                                          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.
*********************************************************************************************************
*/
void OSTaskCreateHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                       /* Prevent compiler warning                                     */
}


/*
*********************************************************************************************************
*                                           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.
*********************************************************************************************************
*/
void OSTaskDelHook (OS_TCB *ptcb)
{
    ptcb = ptcb;                       /* Prevent compiler warning                                     */
}

/*
*********************************************************************************************************
*                                           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).
*********************************************************************************************************
*/
void OSTaskSwHook (void)
{
}

/*
*********************************************************************************************************
*                                           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
*********************************************************************************************************
*/
void OSTaskStatHook (void)
{
}

/*
*********************************************************************************************************
*                                           OSTCBInit() HOOK
*
* Description: This function is called by OSTCBInit() 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_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.
*********************************************************************************************************
*/
void OSTimeTickHook (void)
{
}


/*
*********************************************************************************************************
*                                             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_VERSION >= 251
void OSTaskIdleHook (void)
{
}
#endif
#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
777午夜精品视频在线播放| 午夜激情一区二区| 国产日韩欧美精品在线| 久久久久久久久久久久久夜| 日韩精品一区二区三区视频播放| 欧美日本在线播放| 欧美日本韩国一区二区三区视频 | 国产综合一区二区| 精品制服美女丁香| 国产一区在线精品| 国产精品一区二区你懂的| 国产精品夜夜嗨| 成人av综合一区| 色婷婷精品久久二区二区蜜臀av | 日韩欧美国产电影| 精品国产乱码久久久久久久久 | 国产精品成人免费在线| 国产精品拍天天在线| 1区2区3区国产精品| 亚洲一区二区三区中文字幕在线| 亚洲成人综合在线| 蜜臀久久久久久久| 国产永久精品大片wwwapp| 国产成人免费9x9x人网站视频| 国产一区二区美女诱惑| 91社区在线播放| 精品视频123区在线观看| 3d成人h动漫网站入口| 精品美女在线播放| 最新热久久免费视频| 亚洲第一成人在线| 国产在线精品一区二区不卡了 | 欧美日韩精品一区二区三区 | 中文字幕av在线一区二区三区| 亚洲视频电影在线| 日本视频中文字幕一区二区三区| 伦理电影国产精品| www.综合网.com| 精品视频999| 国产亚洲精品中文字幕| 亚洲色图19p| 日本亚洲免费观看| 成人少妇影院yyyy| 欧美三级资源在线| 久久久精品人体av艺术| 一区二区在线观看视频| 精品亚洲porn| 色激情天天射综合网| 日韩免费福利电影在线观看| 1区2区3区国产精品| 日本 国产 欧美色综合| jlzzjlzz国产精品久久| 在线电影欧美成精品| 综合久久久久久| 日本亚洲视频在线| 91蜜桃在线免费视频| 日韩精品一区二区三区视频| 一区二区三区欧美| 国产激情91久久精品导航| 欧美理论片在线| 136国产福利精品导航| 极品美女销魂一区二区三区| 欧美主播一区二区三区| 久久久久久久电影| 日韩福利视频导航| 日本大香伊一区二区三区| 国产欧美视频一区二区三区| 日本不卡123| 在线视频国产一区| 中文字幕一区二区三区视频| 久久国产精品区| 欧美日韩在线播放一区| 中文字幕一区二区三区四区| 国内不卡的二区三区中文字幕| 欧美日韩精品专区| 伊人婷婷欧美激情| 成人三级伦理片| 久久亚洲一区二区三区四区| 日韩主播视频在线| 色吧成人激情小说| 国产精品久久久久久久浪潮网站| 精品影院一区二区久久久| 欧美性感一区二区三区| 亚洲视频一区二区免费在线观看| 国产91清纯白嫩初高中在线观看| 精品国产一区二区亚洲人成毛片 | 不卡电影免费在线播放一区| 精品国产乱码久久久久久1区2区 | 国产高清亚洲一区| 精品不卡在线视频| 麻豆国产精品视频| 欧美精品久久99久久在免费线 | 亚洲国产中文字幕| 色8久久人人97超碰香蕉987| 亚洲欧美日韩电影| 91在线看国产| 最新热久久免费视频| 97久久精品人人做人人爽50路 | 麻豆精品精品国产自在97香蕉| 欧美日韩一区二区电影| 亚洲美女在线国产| 一本到高清视频免费精品| 亚洲精品成人悠悠色影视| 91麻豆视频网站| 一区二区三区四区视频精品免费| 色综合久久六月婷婷中文字幕| 亚洲精品中文在线影院| 欧美色图12p| 婷婷一区二区三区| 日韩一级免费一区| 另类小说一区二区三区| 欧美r级电影在线观看| 国产精品影视在线观看| 国产精品色在线| 色综合天天视频在线观看 | 日本道精品一区二区三区| 一区二区三区在线观看欧美| 在线观看三级视频欧美| 亚洲成人自拍偷拍| 日韩一二三区不卡| 国产一区二区三区av电影| 亚洲国产精品成人久久综合一区 | 日韩欧美视频在线| 精品亚洲国内自在自线福利| 精品国产乱子伦一区| 国产精品资源在线| 亚洲欧美另类图片小说| 欧美人xxxx| 国产精品1区2区3区在线观看| 日本一区二区免费在线观看视频 | 国产精品中文字幕日韩精品 | 视频一区欧美日韩| 精品国产凹凸成av人网站| 国产91精品在线观看| 亚洲人成精品久久久久久| 欧美亚洲免费在线一区| 麻豆国产欧美日韩综合精品二区| 国产日韩欧美精品在线| 欧美亚洲自拍偷拍| 国产在线播放一区二区三区| 亚洲人123区| 日韩欧美电影一二三| 成人污污视频在线观看| 亚洲www啪成人一区二区麻豆| www亚洲一区| 91福利在线播放| 激情偷乱视频一区二区三区| 亚洲精品乱码久久久久久| 日韩欧美专区在线| 不卡一区二区三区四区| 麻豆freexxxx性91精品| 亚洲人吸女人奶水| 2023国产精品自拍| 欧美在线观看一区| 国产精品18久久久久久久久久久久| 亚洲最新视频在线观看| 久久综合成人精品亚洲另类欧美| 777a∨成人精品桃花网| 97久久人人超碰| 国内外成人在线| 亚洲一区在线观看视频| 国产日韩精品一区二区三区| 欧美日产在线观看| 91蝌蚪porny成人天涯| 国产真实精品久久二三区| 一区二区三区加勒比av| 中文字幕不卡在线| 精品久久久久久久久久久久久久久久久| 91年精品国产| 国产精品自拍毛片| 美女一区二区久久| 亚洲最大色网站| 1区2区3区国产精品| 久久久久久久久久久久久久久99 | 久久你懂得1024| 欧美一区二区在线观看| 91麻豆国产精品久久| 国产成人8x视频一区二区| 日韩av中文字幕一区二区三区| 成人欧美一区二区三区| 久久久久久久久久久99999| 日韩一级黄色大片| 欧美午夜寂寞影院| 色先锋aa成人| 成人综合婷婷国产精品久久蜜臀 | 欧美偷拍一区二区| 99久久精品国产毛片| 粉嫩av一区二区三区在线播放| 狠狠色丁香久久婷婷综合丁香| 天堂成人免费av电影一区| 亚洲制服欧美中文字幕中文字幕| 中文字幕视频一区| 国产情人综合久久777777| 精品国产1区二区| 日韩精品综合一本久道在线视频| 欧美日韩一区高清| 欧美日韩国产综合一区二区三区| 欧洲精品一区二区| 欧美视频完全免费看| 欧美亚洲综合久久|