⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 untitl~1.searchresults

📁 transplant uc/os2 on coldfire5307 编译通过
💻 SEARCHRESULTS
📖 第 1 页 / 共 5 页
字号:
Os_core.c (source):*                                   MAKE TASK WAIT FOR EVENT TO OCCUR
Os_core.c (source):* Description: This function is called by other uC/OS-II services to suspend a task because an event has
Os_core.c (source):* Arguments  : pevent   is a pointer to the event control block for which the task will be waiting for.
Os_core.c (source):void  OS_EventTaskWait (OS_EVENT *pevent)
Os_core.c (source):    if ((OSRdyTbl[OSTCBCur->OSTCBY] &= ~OSTCBCur->OSTCBBitX) == 0x00) {   /* Task no longer ready      */
Os_core.c (source):        OSRdyGrp &= ~OSTCBCur->OSTCBBitY;        /* Clear event grp bit if this was only task pending  */
Os_core.c (source):    pevent->OSEventTbl[OSTCBCur->OSTCBY] |= OSTCBCur->OSTCBBitX;          /* Put task in waiting list  */
Os_core.c (source):*                              MAKE TASK READY TO RUN BASED ON EVENT TIMEOUT
Os_core.c (source):* Description: This function is called by other uC/OS-II services to make a task ready to run because a
Os_core.c (source):* Arguments  : pevent   is a pointer to the event control block which is readying a task.
Os_core.c (source):    pevent->OSEventGrp = 0x00;                   /* No task waiting on event                           */
Os_core.c (source):    OSTaskCtr     = 0;                                           /* Clear the number of tasks                */
Os_core.c (source):    OSRunning     = FALSE;                                       /* Indicate that multitasking not started   */
Os_core.c (source):#if (OS_TASK_STAT_EN > 0) && (OS_TASK_CREATE_EXT_EN > 0)
Os_core.c (source):    OSStatRdy     = FALSE;                                       /* Statistic task is not ready              */
Os_core.c (source):*                                         CREATING THE IDLE TASK
Os_core.c (source):* Description: This function creates the Idle Task.
Os_core.c (source):static  void  OS_InitTaskIdle (void)
Os_core.c (source):#if OS_TASK_CREATE_EXT_EN > 0
Os_core.c (source):    (void)OSTaskCreateExt(OS_TaskIdle,
Os_core.c (source):                          (void *)0,                                 /* No arguments passed to OS_TaskIdle() */
Os_core.c (source):                          &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1], /* Set Top-Of-Stack                     */
Os_core.c (source):                          OS_TASK_IDLE_ID,
Os_core.c (source):                          &OSTaskIdleStk[0],                         /* Set Bottom-Of-Stack                  */
Os_core.c (source):                          OS_TASK_IDLE_STK_SIZE,
Os_core.c (source):                          OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);/* Enable stack checking + clear stack  */
Os_core.c (source):    (void)OSTaskCreateExt(OS_TaskIdle,
Os_core.c (source):                          (void *)0,                                 /* No arguments passed to OS_TaskIdle() */
Os_core.c (source):                          &OSTaskIdleStk[0],                         /* Set Top-Of-Stack                     */
Os_core.c (source):                          OS_TASK_IDLE_ID,
Os_core.c (source):                          &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1], /* Set Bottom-Of-Stack                  */
Os_core.c (source):                          OS_TASK_IDLE_STK_SIZE,
Os_core.c (source):                          OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);/* Enable stack checking + clear stack  */
Os_core.c (source):    (void)OSTaskCreate(OS_TaskIdle,
Os_core.c (source):                       &OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE - 1],
Os_core.c (source):    (void)OSTaskCreate(OS_TaskIdle,
Os_core.c (source):                       &OSTaskIdleStk[0],
Os_core.c (source):*                                      CREATING THE STATISTIC TASK
Os_core.c (source):* Description: This function creates the Statistic Task.
Os_core.c (source):#if OS_TASK_STAT_EN > 0
Os_core.c (source):static  void  OS_InitTaskStat (void)
Os_core.c (source):#if OS_TASK_CREATE_EXT_EN > 0
Os_core.c (source):    (void)OSTaskCreateExt(OS_TaskStat,
Os_core.c (source):                          (void *)0,                                   /* No args passed to OS_TaskStat()*/
Os_core.c (source):                          &OSTaskStatStk[OS_TASK_STAT_STK_SIZE - 1],   /* Set Top-Of-Stack               */
Os_core.c (source):                          OS_STAT_PRIO,                                /* One higher than the idle task  */
Os_core.c (source):                          OS_TASK_STAT_ID,
Os_core.c (source):                          &OSTaskStatStk[0],                           /* Set Bottom-Of-Stack            */
Os_core.c (source):                          OS_TASK_STAT_STK_SIZE,
Os_core.c (source):                          OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);  /* Enable stack checking + clear  */
Os_core.c (source):    (void)OSTaskCreateExt(OS_TaskStat,
Os_core.c (source):                          (void *)0,                                   /* No args passed to OS_TaskStat()*/
Os_core.c (source):                          &OSTaskStatStk[0],                           /* Set Top-Of-Stack               */
Os_core.c (source):                          OS_STAT_PRIO,                                /* One higher than the idle task  */
Os_core.c (source):                          OS_TASK_STAT_ID,
Os_core.c (source):                          &OSTaskStatStk[OS_TASK_STAT_STK_SIZE - 1],   /* Set Bottom-Of-Stack            */
Os_core.c (source):                          OS_TASK_STAT_STK_SIZE,
Os_core.c (source):                          OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);  /* Enable stack checking + clear  */
Os_core.c (source):    (void)OSTaskCreate(OS_TaskStat,
Os_core.c (source):                       (void *)0,                                      /* No args passed to OS_TaskStat()*/
Os_core.c (source):                       &OSTaskStatStk[OS_TASK_STAT_STK_SIZE - 1],      /* Set Top-Of-Stack               */
Os_core.c (source):                       OS_STAT_PRIO);                                  /* One higher than the idle task  */
Os_core.c (source):    (void)OSTaskCreate(OS_TaskStat,
Os_core.c (source):                       (void *)0,                                      /* No args passed to OS_TaskStat()*/
Os_core.c (source):                       &OSTaskStatStk[0],                              /* Set Top-Of-Stack               */
Os_core.c (source):                       OS_STAT_PRIO);                                  /* One higher than the idle task  */
Os_core.c (source):*                            INITIALIZE THE FREE LIST OF TASK CONTROL BLOCKS
Os_core.c (source):    for (i = 0; i < (OS_MAX_TASKS + OS_N_SYS_TASKS - 1); i++) {  /* Init. list of free TCBs                  */
Os_core.c (source):*              priority task has been made ready to run.  This function is invoked by TASK level code
Os_core.c (source):*              and is not used to reschedule tasks from ISRs (see OSIntExit() for ISR rescheduling).
Os_core.c (source):        if (OSPrioHighRdy != OSPrioCur) {              /* No Ctx Sw if current task is highest rdy     */
Os_core.c (source):            OS_TASK_SW();                              /* Perform a context switch                     */
Os_core.c (source):*                                              IDLE TASK
Os_core.c (source):* Description: This task is internal to uC/OS-II and executes whenever no other higher priority tasks
Os_core.c (source):* Note(s)    : 1) OSTaskIdleHook() is called after the critical section to ensure that interrupts will be
Os_core.c (source):void  OS_TaskIdle (void *pdata)
Os_core.c (source):        OSTaskIdleHook();                        /* Call user definable HOOK                           */
Os_core.c (source):*                                            STATISTICS TASK
Os_core.c (source):* Description: This task is internal to uC/OS-II and is used to compute some statistics about the
Os_core.c (source):*              multitasking environment.  Specifically, OS_TaskStat() computes the CPU usage.
Os_core.c (source):* Notes      : 1) This task runs at a priority level higher than the idle task.  In fact, it runs at the
Os_core.c (source):*              2) You can disable this task by setting the configuration #define OS_TASK_STAT_EN to 0.
Os_core.c (source):*                 have all other tasks created before we do statistics.  You MUST have at least a delay
Os_core.c (source):#if OS_TASK_STAT_EN > 0
Os_core.c (source):void  OS_TaskStat (void *pdata)
Os_core.c (source):        OSTimeDly(2 * OS_TICKS_PER_SEC);         /* Wait until statistic task is ready                 */
Os_core.c (source):        OSTaskStatHook();                        /* Invoke user definable hook                         */
Os_core.c (source):* Description: This function is internal to uC/OS-II and is used to initialize a Task Control Block when
Os_core.c (source):*              a task is created (see OSTaskCreate() and OSTaskCreateExt()).
Os_core.c (source):* Arguments  : prio          is the priority of the task being created
Os_core.c (source):*              ptos          is a pointer to the task's top-of-stack assuming that the CPU registers
Os_core.c (source):*                            'OSTaskCreate()'.
Os_core.c (source):*              id            is the task's ID (0..65535)
Os_core.c (source):*                            specific.  'stk_size' is 0 if called by 'OSTaskCreate()'.
Os_core.c (source):*              pext          is a pointer to a user supplied memory area that is used to extend the task
Os_core.c (source):*                            context switch.  You can even assign a name to each task and store this name
Os_core.c (source):*                            in this TCB extension.  A NULL pointer is passed if called by OSTaskCreate().
Os_core.c (source):*              opt           options as passed to 'OSTaskCreateExt()' or,
Os_core.c (source):*                            0 if called from 'OSTaskCreate()'.
Os_core.c (source):*              OS_NO_MORE_TCB    if there are no more free TCBs to be allocated and thus, the task cannot
Os_core.c (source):        ptcb->OSTCBPrio      = (INT8U)prio;                /* Load task priority into TCB              */
Os_core.c (source):        ptcb->OSTCBStat      = OS_STAT_RDY;                /* Task is ready to run                     */
Os_core.c (source):        ptcb->OSTCBDly       = 0;                          /* Task is not delayed                      */
Os_core.c (source):#if OS_TASK_CREATE_EXT_EN > 0
Os_core.c (source):        ptcb->OSTCBOpt       = opt;                        /* Store task options                       */
Os_core.c (source):        ptcb->OSTCBId        = id;                         /* Store task ID                            */
Os_core.c (source):#if OS_TASK_DEL_EN > 0
Os_core.c (source):        ptcb->OSTCBEventPtr  = (OS_EVENT *)0;              /* Task is not pending on an event          */
Os_core.c (source):#if (OS_VERSION >= 251) && (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0) && (OS_TASK_DEL_EN > 0)
Os_core.c (source):        ptcb->OSTCBFlagNode  = (OS_FLAG_NODE *)0;          /* Task is not pending on an event flag     */
Os_core.c (source):        OSTaskCreateHook(ptcb);                            /* Call user defined hook                   */
Os_core.c (source):        OSRdyGrp               |= ptcb->OSTCBBitY;         /* Make task ready to run                   */
Os_flag.c (source):static  BOOLEAN  OS_FlagTaskRdy(OS_FLAG_NODE *pnode, OS_FLAGS flags_rdy);
Os_flag.c (source):* Called from: Task or ISR
Os_flag.c (source):* Called from: Task ONLY
Os_flag.c (source):        pgrp->OSFlagWaitList = (void *)0;           /* Clear list of tasks waiting on flags            */
Os_flag.c (source):* Description: This function deletes an event flag group and readies all tasks pending on the event flag
Os_flag.c (source):*                            opt == OS_DEL_NO_PEND   Deletes the event flag group ONLY if no task pending
Os_flag.c (source):*                            opt == OS_DEL_ALWAYS    Deletes the event flag group even if tasks are
Os_flag.c (source):*                                                    waiting.  In this case, all the tasks pending will be
Os_flag.c (source):*                            OS_ERR_TASK_WAITING     One or more tasks were waiting on the event flag
Os_flag.c (source):* Note(s)    : 1) This function must be used with care.  Tasks that would normally expect the presence of
Os_flag.c (source):*                 time is directly proportional to the number of tasks waiting on the event flag group.
Os_flag.c (source):    BOOLEAN       tasks_waiting;
Os_flag.c (source):    if (pgrp->OSFlagWaitList != (void *)0) {               /* See if any tasks waiting on event flags  */
Os_flag.c (source):        tasks_waiting = TRUE;                              /* Yes                                      */
Os_flag.c (source):        tasks_waiting = FALSE;                             /* No                                       */
Os_flag.c (source):        case OS_DEL_NO_PEND:                               /* Delete group if no task waiting          */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -