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

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

?? os_cpu_c.c

?? uc/os的多任務(wù)處理。20ms間隔
?? C
字號(hào):
/*
*********************************************************************************************************
*                                               uC/OS-II
*                                         The Real-Time Kernel
*
*                        (c) Copyright 1992-1998, Jean J. Labrosse, Plantation, FL
*                                          All Rights Reserved
*                        (c) Copyright ARM Limited 1999.  All rights reserved.
*
*                                          ARM Specific code
*
*
* File : OS_CPU_C.C
*********************************************************************************************************
*/

#define  OS_CPU_GLOBALS
#include "includes.h"

/*
*********************************************************************************************************
*                                        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 *OSTaskStkInit (void (*task)(void *pd), void *pdata, void *ptos, INT16U opt)
{
    unsigned int *stk;

    opt    = opt;                           /* 'opt' is not used, prevent warning                      */
    stk    = (unsigned int *)ptos;          /* Load stack pointer                                      */

    /* build a context for the new task */
    *--stk = (unsigned int) task;       /* pc */
    *--stk = (unsigned int) task;       /* lr */

    *--stk = 0;                         /* r12 */
    *--stk = 0;                         /* r11 */
    *--stk = 0;                         /* r10 */
    *--stk = 0;                         /* r9 */
    *--stk = 0;                         /* r8 */
    *--stk = 0;                         /* r7 */
    *--stk = 0;                         /* r6 */
    *--stk = 0;                         /* r5 */
    *--stk = 0;                         /* r4 */
    *--stk = 0;                         /* r3 */
    *--stk = 0;                         /* r2 */
    *--stk = 0;                         /* r1 */
    *--stk = (unsigned int) pdata;      /* r0 */
    *--stk = (SVC32MODE|0x0);			/* cpsr  IRQ, FIQ disable*/
    *--stk = (SVC32MODE|0x0);			/* spsr  IRQ, FIQ disable */


    return ((void *)stk);
}

/*$PAGE*/
#if OS_CPU_HOOKS_EN
/*
*********************************************************************************************************
*                                          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)
{
}

/*
*********************************************************************************************************
*                                               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)
{
}
#endif

#define BUILD_DATE "Date: " __DATE__ "\n"

/*
 * Initialize an ARM Target board
 */
void
 ARMTargetInit(void)
{
    /* ---- Tell the world who we are ---------------------------------- */
    uHALr_printf("\nuCOS-II Running on a") ;
#if defined(EBSA285)
    uHALr_printf("n EBSA-285 (21285 evaluation board)\n") ;
#elif defined(BRUTUS) 
    uHALr_printf(" Brutus (SA-1100 verification platform)\n") ;
#elif defined(INTEGRATOR) 
    uHALr_printf("n Integrator board\n") ;
#elif defined(PROSPECTOR) 
    uHALr_printf(" Prospector board\n") ;
#elif defined(SAMSUNG)
	uHALr_printf(" SAMSUNG board\n");
#else
    uHALr_printf("n unknown ARM board\n") ;
#endif                                                                // */
    uHALr_printf(uHAL_VERSION_STRING); 
    uHALr_printf("\n") ;
    uHALr_printf(BUILD_DATE);
    uHALr_printf("\n") ;

#ifdef DEBUG
    uHALr_printf("Initialising target\n");
#endif

    /* ---- disable the MMU        ------------------------------------- */
    uHALr_ResetMMU();//do noting here

    /* ---- disable interrupts (IRQs) --------------------------------- */
    ARMDisableInt();

    /* ---- soft vectors ---------------------------------------------- */
#ifdef DEBUG
    uHALr_printf("Setting up soft vectors\n");
#endif
    /* Define pre & post-process routines for Interrupt */
    uHALir_DefineIRQ((void *)IrqStart, (void *)IrqFinish, (void *) 0);
    uHALr_InitInterrupts();

#ifdef DEBUG
    uHALr_printf("Timer init\n");
#endif
    uHALr_InitTimers();

#ifdef DEBUG
    uHALr_printf("targetInit() complete\n");
#endif
}                               /* targetInit */

/* start the ARM target running */
void
 ARMTargetStart(void)
{
#ifdef DEBUG
    uHALr_printf("Starting target\n") ;
#endif

    /* request the system timer */
    if (uHALr_RequestSystemTimer(
                                 (void *) OSTimeTick,
                                 (const unsigned char *)"uCOS-II") <= 0)
        uHALr_printf("Timer/IRQ busy\n");

    /* Start system timer & enable the interrupt. */
    uHALr_InstallSystemTimer();
}

extern void IRQContextSwap(void);   /* post DispatchIRQ processing (the _real_ one) */

/* just 'notice' that we need to change context */
int need_to_swap_context = 0 ;
void OSIntCtxSw(void) {            //Interrupt Task Switch function
    need_to_swap_context = 1;
}

/* This is what uCOS does at the start of an IRQ */
void IrqStart(void)
{
    /* increment nesting counter */
    OSIntNesting++;
}

/* This is what uCOS does at the end of an IRQ */
void *IrqFinish(void)
{
    OSIntExit() ;
    if (need_to_swap_context) {
//        need_to_swap_context = 0 ;
        return ((void *)IRQContextSwap) ;
    } else {
        return (void *)0;
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
7777精品伊人久久久大香线蕉| 久久国产精品露脸对白| 不卡高清视频专区| 国产精品天美传媒| 岛国av在线一区| 亚洲欧美怡红院| 欧美综合在线视频| 日韩精品亚洲一区二区三区免费| 欧美日本一区二区三区| 蜜臀精品久久久久久蜜臀| 精品国产不卡一区二区三区| 国产精品1024久久| 中文字幕一区二区三区乱码在线| 色婷婷激情综合| 首页国产丝袜综合| 久久日一线二线三线suv| 成人免费视频视频| 亚洲影院免费观看| 日韩一区二区精品葵司在线| 国产伦精一区二区三区| 自拍av一区二区三区| 欧美日韩免费不卡视频一区二区三区| 五月天中文字幕一区二区| 精品国产乱码久久久久久老虎| 国产成a人无v码亚洲福利| 亚洲另类一区二区| 日韩欧美国产三级电影视频| 成人晚上爱看视频| 天堂va蜜桃一区二区三区 | 色综合久久久久久久久| 亚洲成人中文在线| 国产欧美日韩在线看| 欧美日韩一区不卡| 成人午夜激情影院| 毛片基地黄久久久久久天堂| 17c精品麻豆一区二区免费| 宅男噜噜噜66一区二区66| 99久久精品国产一区二区三区| 日韩精品成人一区二区三区| 国产精品视频在线看| 欧美一区二区三区免费大片| av不卡在线播放| 久久99精品久久久久久久久久久久| 亚洲色图视频免费播放| 2020国产精品自拍| 欧美伦理视频网站| av成人免费在线| 韩国在线一区二区| 天使萌一区二区三区免费观看| 国产精品传媒视频| 久久精品在这里| 欧美一区二区三区系列电影| 在线一区二区视频| 99久久综合精品| 国产精品影视天天线| 日韩av成人高清| 亚洲午夜成aⅴ人片| 国产精品久久99| 久久久综合精品| 日韩精品一区二区三区中文精品| 欧美色电影在线| 色狠狠桃花综合| 9色porny自拍视频一区二区| 国产精品一二三四| 激情图片小说一区| 奇米精品一区二区三区在线观看一 | 亚洲一区二区三区四区在线观看 | 九九视频精品免费| 日韩精品电影在线观看| 亚洲一区二区3| 亚洲激情自拍视频| 亚洲素人一区二区| 亚洲丝袜美腿综合| 亚洲欧洲日韩av| 国产精品国产三级国产aⅴ入口| 久久久久久黄色| 国产日韩欧美精品电影三级在线| 久久综合九色综合欧美就去吻| 91精品国产一区二区| 欧美一区二区在线视频| 91精品免费观看| 日韩视频永久免费| 精品电影一区二区三区| 久久综合色8888| 国产欧美日韩在线视频| 国产精品欧美极品| 亚洲视频每日更新| 亚洲一区二区精品久久av| 亚洲国产cao| 男人的天堂久久精品| 久久电影网站中文字幕| 国产精品主播直播| 成人av午夜电影| 色哟哟国产精品| 欧美精品在线一区二区三区| 欧美一区二区在线看| 亚洲精品一区在线观看| 日本一区二区久久| 最近中文字幕一区二区三区| 一区二区日韩av| 日本少妇一区二区| 国产福利一区二区三区视频| www.视频一区| 欧美人伦禁忌dvd放荡欲情| 日韩小视频在线观看专区| 国产欧美一区二区精品仙草咪| 国产精品福利影院| 亚洲电影你懂得| 激情综合色播激情啊| 99re视频精品| 在线播放亚洲一区| 欧美国产一区二区| 亚洲欧美激情在线| 奇米影视7777精品一区二区| 国产精品12区| 欧美日韩电影在线| 国产欧美日韩在线| 午夜视频在线观看一区二区三区| 精品一区二区三区在线播放视频| 99久久综合狠狠综合久久| 91精品国产高清一区二区三区蜜臀| 久久久精品人体av艺术| 亚洲高清在线精品| 国产不卡高清在线观看视频| 欧美日本韩国一区| 中文字幕一区二区三区四区 | 国产欧美一区二区精品秋霞影院 | 99麻豆久久久国产精品免费| 日韩一区二区三区精品视频| 国产精品国产三级国产三级人妇| 日韩综合一区二区| 99久久久无码国产精品| 精品久久久久久亚洲综合网| 夜夜爽夜夜爽精品视频| 粉嫩久久99精品久久久久久夜| 欧美日韩久久久一区| 国产精品国产三级国产有无不卡 | 久久精品夜色噜噜亚洲aⅴ| 亚洲国产日韩精品| 成人动漫一区二区三区| 精品粉嫩aⅴ一区二区三区四区| 一个色在线综合| www.亚洲精品| 欧美国产禁国产网站cc| 久久精品噜噜噜成人av农村| 欧美三级在线播放| 亚洲精品久久久蜜桃| 国产成人精品亚洲日本在线桃色| 欧美一区二区三区在| 午夜伦欧美伦电影理论片| 91在线视频免费观看| 国产欧美一区二区精品忘忧草| 久久99精品久久久| 欧美另类videos死尸| 亚洲愉拍自拍另类高清精品| 99在线视频精品| 综合久久久久久| 成人黄色电影在线| 国产欧美精品区一区二区三区| 久久99久久99小草精品免视看| 91精品国产综合久久久久| 亚洲亚洲人成综合网络| 在线亚洲免费视频| 亚洲视频免费看| 色诱亚洲精品久久久久久| 中文字幕视频一区| 91丝袜国产在线播放| 欧美激情一区三区| www.成人网.com| 中文字幕一区不卡| 色屁屁一区二区| 亚洲午夜一二三区视频| 欧美日韩亚洲国产综合| 天堂蜜桃91精品| 精品乱码亚洲一区二区不卡| 久久av资源站| 久久精品水蜜桃av综合天堂| 国产精品一区专区| 亚洲国产精品成人综合色在线婷婷 | 国产欧美日韩在线看| 成人免费的视频| 亚洲欧美二区三区| 欧美亚洲综合网| 日韩av电影天堂| 欧美成人一级视频| 国产成人亚洲综合a∨猫咪| 国产日韩综合av| 色综合久久九月婷婷色综合| 亚洲综合色网站| 欧美一区二区三区免费视频 | 麻豆专区一区二区三区四区五区| 日韩欧美黄色影院| 国产剧情一区二区| 亚洲蜜臀av乱码久久精品蜜桃| 欧美日韩视频在线一区二区| 六月丁香婷婷色狠狠久久| 日本一二三四高清不卡| 欧美性大战久久久久久久蜜臀| 伦理电影国产精品| 亚洲免费大片在线观看|