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

📄 untitl~1.searchresults

📁 transplant uc/os2 on coldfire5307 编译通过
💻 SEARCHRESULTS
📖 第 1 页 / 共 5 页
字号:
Os_flag.c (source):             if (tasks_waiting == FALSE) {
Os_flag.c (source):                 *err                 = OS_ERR_TASK_WAITING;
Os_flag.c (source):             while (pnode != (OS_FLAG_NODE *)0) {          /* Ready ALL tasks waiting for flags        */
Os_flag.c (source):                 OS_FlagTaskRdy(pnode, (OS_FLAGS)0);
Os_flag.c (source):             if (tasks_waiting == TRUE) {                  /* Reschedule only if task(s) were waiting  */
Os_flag.c (source):                 OS_Sched();                               /* Find highest priority task ready to run  */
Os_flag.c (source):*              timeout       is an optional timeout (in clock ticks) that your task will wait for the
Os_flag.c (source):*                            desired bit combination.  If you specify 0, however, your task will wait
Os_flag.c (source):* Returns    : The new state of the flags in the event flag group when the task is resumed or,
Os_flag.c (source):* Called from: Task ONLY
Os_flag.c (source):             } else {                                      /* Block task until events occur or timeout */
Os_flag.c (source):             } else {                                      /* Block task until events occur or timeout */
Os_flag.c (source):             } else {                                      /* Block task until events occur or timeout */
Os_flag.c (source):             } else {                                      /* Block task until events occur or timeout */
Os_flag.c (source):        OSTCBCur->OSTCBStat = OS_STAT_RDY;                 /* Yes, make task ready-to-run              */
Os_flag.c (source):* Called From: Task or ISR
Os_flag.c (source):* WARNING(s) : 1) The execution time of this function depends on the number of tasks waiting on the event
Os_flag.c (source):*              2) The amount of time interrupts are DISABLED depends on the number of tasks waiting on
Os_flag.c (source):    while (pnode != (OS_FLAG_NODE *)0) {             /* Go through all tasks waiting on event flag(s)  */
Os_flag.c (source):                     if (OS_FlagTaskRdy(pnode, flags_rdy) == TRUE) { /* Make task RTR, event(s) Rx'd   */
Os_flag.c (source):                     if (OS_FlagTaskRdy(pnode, flags_rdy) == TRUE) { /* Make task RTR, event(s) Rx'd   */
Os_flag.c (source):                     if (OS_FlagTaskRdy(pnode, flags_rdy) == TRUE) { /* Make task RTR, event(s) Rx'd   */
Os_flag.c (source):                     if (OS_FlagTaskRdy(pnode, flags_rdy) == TRUE) { /* Make task RTR, event(s) Rx'd   */
Os_flag.c (source):        pnode = (OS_FLAG_NODE *)pnode->OSFlagNodeNext; /* Point to next task waiting for event flag(s) */
Os_flag.c (source):* Called From: Task or ISR
Os_flag.c (source):*                         SUSPEND TASK UNTIL EVENT FLAG(s) RECEIVED OR TIMEOUT OCCURS
Os_flag.c (source):* Description: This function is internal to uC/OS-II and is used to put a task to sleep until the desired
Os_flag.c (source):*              pnode         is a pointer to a structure which contains data about the task waiting for
Os_flag.c (source):*              timeout       is the desired amount of time that the task will wait for the event flag
Os_flag.c (source):    OSTCBCur->OSTCBDly        = timeout;              /* Store timeout in task's TCB                   */
Os_flag.c (source):#if OS_TASK_DEL_EN > 0
Os_flag.c (source):    pnode->OSFlagNodeTCB      = (void *)OSTCBCur;     /* Link to task's TCB                            */
Os_flag.c (source):                                                      /* Suspend current task until flag(s) received   */
Os_flag.c (source):*                              MAKE TASK READY-TO-RUN, EVENT(s) OCCURRED
Os_flag.c (source):* Description: This function is internal to uC/OS-II and is used to make a task ready-to-run because the
Os_flag.c (source):* Arguments  : pnode         is a pointer to a structure which contains data about the task waiting for
Os_flag.c (source):*              flags_rdy     contains the bit pattern of the event flags that cause the task to become
Os_flag.c (source):static  BOOLEAN  OS_FlagTaskRdy (OS_FLAG_NODE *pnode, OS_FLAGS flags_rdy)
Os_flag.c (source):    ptcb                = (OS_TCB *)pnode->OSFlagNodeTCB;  /* Point to TCB of waiting task             */
Os_flag.c (source):    if (ptcb->OSTCBStat == OS_STAT_RDY) {                  /* Put task into ready list                 */
Os_flag.c (source):*              list of tasks waiting for the event flag.
Os_flag.c (source):* Arguments  : pnode         is a pointer to a structure which contains data about the task waiting for
Os_flag.c (source):* Called by  : OS_FlagTaskRdy() OS_FLAG.C
Os_flag.c (source):*              OSTaskDel()      OS_TASK.C
Os_flag.c (source):#if OS_TASK_DEL_EN > 0
Os_flag.c (source):#if OS_TASK_DEL_EN > 0
Os_mbox.c (source):*              OSMboxAccept() does not suspend the calling task if a message is not available.
Os_mbox.c (source):* Description: This function deletes a mailbox and readies all tasks pending on the mailbox.
Os_mbox.c (source):*                            opt == OS_DEL_NO_PEND   Delete the mailbox ONLY if no task pending
Os_mbox.c (source):*                            opt == OS_DEL_ALWAYS    Deletes the mailbox even if tasks are waiting.
Os_mbox.c (source):*                                                    In this case, all the tasks pending will be readied.
Os_mbox.c (source):*                            OS_ERR_TASK_WAITING     One or more tasks were waiting on the mailbox
Os_mbox.c (source):* Note(s)    : 1) This function must be used with care.  Tasks that would normally expect the presence of
Os_mbox.c (source):*                 time is directly proportional to the number of tasks waiting on the mailbox.
Os_mbox.c (source):*              4) Because ALL tasks pending on the mailbox will be readied, you MUST be careful in
Os_mbox.c (source):    BOOLEAN    tasks_waiting;
Os_mbox.c (source):    if (pevent->OSEventGrp != 0x00) {                      /* See if any tasks waiting on mailbox      */
Os_mbox.c (source):        tasks_waiting = TRUE;                              /* Yes                                      */
Os_mbox.c (source):        tasks_waiting = FALSE;                             /* No                                       */
Os_mbox.c (source):        case OS_DEL_NO_PEND:                               /* Delete mailbox only if no task waiting   */
Os_mbox.c (source):             if (tasks_waiting == FALSE) {
Os_mbox.c (source):                 *err = OS_ERR_TASK_WAITING;
Os_mbox.c (source):             while (pevent->OSEventGrp != 0x00) {          /* Ready ALL tasks waiting for mailbox      */
Os_mbox.c (source):                 OS_EventTaskRdy(pevent, (void *)0, OS_STAT_MBOX);
Os_mbox.c (source):             if (tasks_waiting == TRUE) {                  /* Reschedule only if task(s) were waiting  */
Os_mbox.c (source):                 OS_Sched();                               /* Find highest priority task ready to run  */
Os_mbox.c (source):*              timeout       is an optional timeout period (in clock ticks).  If non-zero, your task will
Os_mbox.c (source):*                            specified by this argument.  If you specify 0, however, your task will wait
Os_mbox.c (source):*                            OS_NO_ERR           The call was successful and your task received a
Os_mbox.c (source):    OSTCBCur->OSTCBStat |= OS_STAT_MBOX;              /* Message not available, task will pend         */
Os_mbox.c (source):    OS_EventTaskWait(pevent);                         /* Suspend task until event or timeout occurs    */
Os_mbox.c (source):    OS_Sched();                                       /* Find next highest priority task ready to run  */
Os_mbox.c (source):    OS_EventTO(pevent);                               /* Timed out, Make task ready                    */
Os_mbox.c (source):    if (pevent->OSEventGrp != 0x00) {                 /* See if any task pending on mailbox            */
Os_mbox.c (source):        OS_EventTaskRdy(pevent, msg, OS_STAT_MBOX);   /* Ready highest priority task waiting on event  */
Os_mbox.c (source):        OS_Sched();                                   /* Find highest priority task ready to run       */
Os_mbox.c (source):*                            OS_POST_OPT_NONE         POST to a single waiting task 
Os_mbox.c (source):*                            OS_POST_OPT_BROADCAST    POST to ALL tasks that are waiting on the mailbox
Os_mbox.c (source):*              interrupt disable time is proportional to the number of tasks waiting on the mailbox.
Os_mbox.c (source):    if (pevent->OSEventGrp != 0x00) {                 /* See if any task pending on mailbox            */
Os_mbox.c (source):        if ((opt & OS_POST_OPT_BROADCAST) != 0x00) {  /* Do we need to post msg to ALL waiting tasks ? */
Os_mbox.c (source):            while (pevent->OSEventGrp != 0x00) {      /* Yes, Post to ALL tasks waiting on mailbox     */           
Os_mbox.c (source):                OS_EventTaskRdy(pevent, msg, OS_STAT_MBOX);    
Os_mbox.c (source):            OS_EventTaskRdy(pevent, msg, OS_STAT_MBOX);    /* No,  Post to HPT waiting on mbox         */
Os_mbox.c (source):        OS_Sched();                                        /* Find highest priority task ready to run  */
Os_mutex.c (source):*              Unlike OSMutexPend(), OSMutexAccept() does not suspend the calling task if the resource is
Os_mutex.c (source):*              intended to be used by tasks only.
Os_mutex.c (source):        pevent->OSEventCnt |= OSTCBCur->OSTCBPrio;     /*      Save current task priority in LSByte    */
Os_mutex.c (source):        pevent->OSEventPtr  = (void *)OSTCBCur;        /*      Link TCB of task owning Mutex           */
Os_mutex.c (source):*                            other words, when the semaphore is acquired and a higher priority task
Os_mutex.c (source):*                            attempts to obtain the semaphore then the priority of the task owning the
Os_mutex.c (source):*                            a priority that is LOWER in value than ANY of the tasks competing for the
Os_mutex.c (source):*                               OS_PRIO_EXIST       if a task at the priority inheritance priority
Os_mutex.c (source):*                 of the task owning the mutex or 0xFF if no task owns the mutex.
Os_mutex.c (source):        OS_EXIT_CRITICAL();                                /* Task already exist at priority ...       */
Os_mutex.c (source):    pevent->OSEventPtr  = (void *)0;                       /* No task owning the mutex                 */
Os_mutex.c (source):* Description: This function deletes a mutual exclusion semaphore and readies all tasks pending on the it.
Os_mutex.c (source):*                            opt == OS_DEL_NO_PEND   Delete mutex ONLY if no task pending
Os_mutex.c (source):*                            opt == OS_DEL_ALWAYS    Deletes the mutex even if tasks are waiting.
Os_mutex.c (source):*                                                    In this case, all the tasks pending will be readied.
Os_mutex.c (source):*                            OS_ERR_TASK_WAITING     One or more tasks were waiting on the mutex
Os_mutex.c (source):* Note(s)    : 1) This function must be used with care.  Tasks that would normally expect the presence of
Os_mutex.c (source):*                 time is directly proportional to the number of tasks waiting on the mutex.
Os_mutex.c (source):*              3) Because ALL tasks pending on the mutex will be readied, you MUST be careful because the
Os_mutex.c (source):    BOOLEAN    tasks_waiting;
Os_mutex.c (source):    if (pevent->OSEventGrp != 0x00) {                      /* See if any tasks waiting on mutex        */
Os_mutex.c (source):        tasks_waiting = TRUE;                              /* Yes                                      */
Os_mutex.c (source):        tasks_waiting = FALSE;                             /* No                                       */
Os_mutex.c (source):        case OS_DEL_NO_PEND:                               /* Delete mutex only if no task waiting     */
Os_mutex.c (source):             if (tasks_waiting == FALSE) {
Os_mutex.c (source):                 *err = OS_ERR_TASK_WAITING;
Os_mutex.c (source):             while (pevent->OSEventGrp != 0x00) {          /* Ready ALL tasks waiting for mutex        */
Os_mutex.c (source):                 OS_EventTaskRdy(pevent, (void *)0, OS_STAT_MUTEX);
Os_mutex.c (source):             if (tasks_waiting == TRUE) {                  /* Reschedule only if task(s) were waiting  */
Os_mutex.c (source):                 OS_Sched();                               /* Find highest priority task ready to run  */
Os_mutex.c (source):*              timeout       is an optional timeout period (in clock ticks).  If non-zero, your task will
Os_mutex.c (source):*                            If you specify 0, however, your task will wait forever at the specified
Os_mutex.c (source):*                               OS_NO_ERR          The call was successful and your task owns the mutex
Os_mutex.c (source):* Note(s)    : 1) The task that owns the Mutex MUST NOT pend on any other event while it owns the mutex.
Os_mutex.c (source):*              2) You MUST NOT change the priority of the task that owns the mutex
Os_mutex.c (source):    BOOLEAN    rdy;                                        /* Flag indicating task was ready           */
Os_mutex.c (source):        pevent->OSEventCnt |= OSTCBCur->OSTCBPrio;         /*      Save priority of owning task        */
Os_mutex.c (source):        pevent->OSEventPtr  = (void *)OSTCBCur;            /*      Point to owning task's OS_TCB       */
Os_mutex.c (source):        ptcb->OSTCBPrio         = pip;                     /* Change owner task prio to PIP            */
Os_mutex.c (source):        if (rdy == TRUE) {                                 /* If task was ready at owner's priority ...*/
Os_mutex.c (source):    OSTCBCur->OSTCBStat |= OS_STAT_MUTEX;             /* Mutex not available, pend current task        */
Os_mutex.c (source):    OSTCBCur->OSTCBDly   = timeout;                   /* Store timeout in current task's TCB           */
Os_mutex.c (source):    OS_EventTaskWait(pevent);                         /* Suspend task until event or timeout occurs    */

⌨️ 快捷键说明

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