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

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

?? os_cpu_c.c

?? nios開發ucos源碼
?? C
字號:
/*
*********************************************************************************************************
*                                               uC/OS-II
*                                         The Real-Time Kernel
*
*                         (c) Copyright 1992-2002, Jean J. Labrosse, Weston, FL
*                                          All Rights Reserved
*
*
*                                      NIOS 32bits implementation
*
*
*
* File         : OS_CPU_C.C
* By           : Jean J. Labrosse
* Ported by    : Farid LEZIAR    (fleziar@yahoo.fr)
*              : version 2.0
*
*    This port is free. you can use it, redistribute it
*    and/or modify it under the following terms:
*
*    1. You are not allowed to remove or modify this copyright notice
*       and License paragraphs, even if parts of the software is used.
*    2. The improvements and/or extentions you make must be available
*       for the community under THIS license, source code included.
*    4. You may NOT distribute this software under another license without
*       explicit permission from farid LEZIAR (fleziar@yahoo.fr).
*    5. This software is free, and distributed in the hope that it will be
*       useful, but WITHOUT ANY WARRANTY.
*    6. Tou have you inform me whenever you use this software.
*
*********************************************************************************************************
*/

#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                                     */
  #if NIOS_OSVIEW == 1
    OSView_TaskCreateHook(ptcb);
  #endif
 }
#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)
{
    OS_STK *stk;

    opt    = opt;                                   /* 'opt' is not used, prevent warning  */
    stk    = ptos;                                  /* Load stack pointer*/
    stk--;                                          /* Let the top unused */

    *stk-- = (OS_STK)(task);                        /* %o7 ( Interrupt Return Address ) */
    *stk-- = (1<<15) | (63<<9) | (getHILIMIT()<<4); /* ISTATUS (IE=1, IPRI=63, CWP = HI_LIMIT, CC = 0); */

    *stk-- = 7;                                     /* %g7 */
    *stk-- = 6;                                     /* %g6 */
    *stk-- = 5;                                     /* %g5 */
    *stk-- = 4;                                     /* %g4 */
    *stk-- = 3;                                     /* %g3 */
    *stk-- = 2;                                     /* %g2 */
    *stk-- = 1;                                     /* %g1 */
    *stk-- = 0;                                     /* %g0 */


    /* Task window (cwp = HI_LIMIT) */
    *stk-- = 0x37;                                  /* %o7 */
    *stk-- = 0x36;                                  /* %o6 ( %sp register ) overwritten in asm */
    *stk-- = 0x35;                                  /* %o5 */
    *stk-- = 0x34;                                  /* %o4 */
    *stk-- = 0x33;                                  /* %o3 */
    *stk-- = 0x32;                                  /* %o2 */
    *stk-- = 0x31;                                  /* %o1 */
    *stk-- = (OS_STK)(pdata);                       /* %o0 ( arg0 for parameters passing from Asm to C : with save instruction ) */

    *stk-- = 0x27;                                  /* %L7 */
    *stk-- = 0x26;                                  /* %L6 */
    *stk-- = 0x25;                                  /* %L5 */
    *stk-- = 0x24;                                  /* %L4 */
    *stk-- = 0x23;                                  /* %L3 */
    *stk-- = 0x22;                                  /* %L2 */
    *stk-- = 0x21;                                  /* %L1 */
    *stk-- = 0x20;                                  /* %L0 */

    *stk-- = 0x17;                                  /* %i7 */
    *stk-- = 0x16;                                  /* %i6 */
    *stk-- = 0x15;                                  /* %i5 */
    *stk-- = 0x14;                                  /* %i4 */
    *stk-- = 0x13;                                  /* %i3 */
    *stk-- = 0x12;                                  /* %i2 */
    *stk-- = 0x11;                                  /* %i1 */
    *stk-- = 0x10;                                  /* %i0 */

    *stk-- = (0<<15) | (63<<9) | ((getHILIMIT()-1)<<4); /* STATUS(ISR) */

    stk -= 23;                                      /* Compiler space */

    /* stk points to a unused entry */
    return ((OS_STK *)stk);
}



/*$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)
 {
 	#if NIOS_OSVIEW == 1
    OSView_TaskSwHook();
  #endif
 }
#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_TIME_TICK_HOOK_EN > 0
 void  OSTimeTickHook (void)
 {
 	#if NIOS_OSVIEW == 1
    OSView_TickHook();
  #endif
 }
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩毛片精品高清免费| 国产伦精一区二区三区| 日韩综合小视频| 韩国一区二区视频| 色94色欧美sute亚洲线路一ni| 在线播放国产精品二区一二区四区| 精品国产伦一区二区三区观看体验 | 亚洲妇熟xx妇色黄| 久久91精品国产91久久小草| 一本色道亚洲精品aⅴ| 久久综合九色综合97婷婷| 亚洲综合色视频| 国产.欧美.日韩| 日韩一区二区三免费高清| 亚洲男女毛片无遮挡| 国产精品一区二区三区99| 欧美欧美欧美欧美| 一区二区不卡在线播放| 高清国产午夜精品久久久久久| 欧美精品三级在线观看| 最新热久久免费视频| 国产成人亚洲综合a∨猫咪| 4438x成人网最大色成网站| 日本va欧美va欧美va精品| 色欧美片视频在线观看| 国产精品家庭影院| 国产精品1区2区3区| 日韩一级黄色片| 首页国产丝袜综合| 欧美日韩精品一区二区在线播放| 亚洲欧洲精品天堂一级| 国产.欧美.日韩| 久久久久成人黄色影片| 国产一区二区三区| 久久女同互慰一区二区三区| 国产真实乱偷精品视频免| 欧美刺激午夜性久久久久久久| 日韩影院精彩在线| 91精品国产综合久久精品性色| 亚洲最新视频在线观看| 在线日韩av片| 亚洲成人自拍偷拍| 欧美日韩aaa| 蜜桃一区二区三区在线| 欧美精品tushy高清| 日韩av网站免费在线| 欧美精品 国产精品| 午夜精品在线视频一区| 欧美一区二区精品| 激情六月婷婷综合| 国产香蕉久久精品综合网| 成人午夜在线视频| 亚洲日本在线观看| 欧美日韩在线播放三区| 蜜臀精品久久久久久蜜臀| 精品国产污网站| 盗摄精品av一区二区三区| 综合久久久久久久| 欧美精品日韩一本| 国产一区二区按摩在线观看| 日韩极品在线观看| 久久蜜桃香蕉精品一区二区三区| 国产999精品久久久久久绿帽| 国产精品乱码人人做人人爱| 99re66热这里只有精品3直播| 亚洲精品乱码久久久久久黑人 | 91一区二区在线| 一区二区三区不卡视频| 这里只有精品视频在线观看| 精品一区二区成人精品| 中文字幕第一区第二区| 欧美性感一类影片在线播放| 美女一区二区久久| 国产精品久久久久久亚洲毛片 | 亚洲成av人片在www色猫咪| 日韩欧美中文一区| av在线一区二区三区| 午夜免费久久看| 国产女主播在线一区二区| 欧美亚洲另类激情小说| 国产毛片精品国产一区二区三区| 亚洲欧洲99久久| 欧美一区二区三区不卡| 成人ar影院免费观看视频| 日本三级韩国三级欧美三级| 中文字幕av免费专区久久| 欧美日韩一区在线| 不卡视频免费播放| 秋霞国产午夜精品免费视频| 亚洲色图视频免费播放| 艳妇臀荡乳欲伦亚洲一区| 日韩精品一区二区三区四区视频| 91在线你懂得| 国内精品国产成人| 午夜不卡av在线| 亚洲日本丝袜连裤袜办公室| 久久亚洲一级片| 日韩欧美国产麻豆| 欧美日韩大陆一区二区| 91视频国产观看| 成人性视频免费网站| 精品午夜久久福利影院| 午夜视频一区在线观看| 一区二区三区高清在线| 亚洲欧美日韩综合aⅴ视频| 久久久99精品久久| 精品卡一卡二卡三卡四在线| 欧美肥胖老妇做爰| 欧美性视频一区二区三区| 色诱视频网站一区| 成人av网站在线| 国产**成人网毛片九色| 久久99久国产精品黄毛片色诱| 亚洲国产一区视频| 亚洲一二三四久久| 一区二区日韩av| 亚洲码国产岛国毛片在线| 亚洲欧洲av色图| 亚洲人午夜精品天堂一二香蕉| 国产精品久久久久婷婷| 国产精品久久久久久久久免费丝袜 | 国产视频一区二区在线观看| 精品伦理精品一区| 欧美精品一区二区在线播放| 欧美v亚洲v综合ⅴ国产v| 日韩精品影音先锋| 精品福利一二区| 久久综合九色综合97婷婷| 久久久精品国产99久久精品芒果| 久久久另类综合| 国产女人18毛片水真多成人如厕 | 亚洲欧美日韩小说| 亚洲精品网站在线观看| 粉嫩高潮美女一区二区三区| 国产盗摄一区二区| 成人三级伦理片| 91看片淫黄大片一级在线观看| 日本高清不卡aⅴ免费网站| 在线观看一区日韩| 欧美精品乱人伦久久久久久| 欧美成人艳星乳罩| 亚洲国产精品成人综合| 亚洲私人影院在线观看| 亚洲成a人v欧美综合天堂下载| 亚洲综合精品自拍| 精品一区二区三区视频在线观看| 国产精品资源网| 99re视频精品| 555夜色666亚洲国产免| 国产人久久人人人人爽| 一区二区三区国产精品| 久久成人精品无人区| 不卡的电影网站| 欧美精品一二三区| 国产精品亲子伦对白| 一二三四社区欧美黄| 激情av综合网| 91久久一区二区| 精品99一区二区三区| 成人欧美一区二区三区小说| 日韩av高清在线观看| av在线不卡电影| 日韩欧美色综合网站| 亚洲人成精品久久久久| 精品一区二区免费| 欧美在线免费播放| 中文字幕电影一区| 麻豆视频一区二区| 色www精品视频在线观看| 精品盗摄一区二区三区| 亚洲一区免费观看| 国产 欧美在线| 日韩欧美三级在线| 亚洲综合在线五月| 成人永久免费视频| 日韩一区二区在线看片| 亚洲人成精品久久久久久| 精品亚洲成a人在线观看| 欧美精品成人一区二区三区四区| 国产日韩精品一区二区三区在线| 一区二区三区久久久| 成人精品国产一区二区4080| 日韩欧美一区二区三区在线| 亚洲自拍偷拍综合| 99视频在线观看一区三区| 久久精品网站免费观看| 裸体一区二区三区| 在线不卡一区二区| 亚洲一二三级电影| 91亚洲精品久久久蜜桃网站| 国产网红主播福利一区二区| 日本美女视频一区二区| 欧美日韩中文字幕一区| 亚洲另类中文字| 99久久婷婷国产综合精品| 欧美国产国产综合| 成人午夜伦理影院| 国产午夜精品一区二区三区视频| 极品尤物av久久免费看| 日韩欧美在线影院|