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

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

?? os_q.lst

?? ucos v2.62 安裝程序 附帶已移植到C8051F020的UCOS源碼
?? LST
?? 第 1 頁 / 共 4 頁
字號:
                  pq = (OS_Q *)pevent->OSEventPtr;             /* Point at queue control block                       */
                  if (pq->OSQEntries > 0) {                    /* See if any messages in the queue                   */
                      msg = *pq->OSQOut++;                     /* Yes, extract oldest message from the queue         */
                      pq->OSQEntries--;                        /* Update the number of entries in the queue          */
                      if (pq->OSQOut == pq->OSQEnd) {          /* Wrap OUT pointer if we are at the end of the queue */
                          pq->OSQOut = pq->OSQStart;
                      }
                      OS_EXIT_CRITICAL();
                      *err = OS_NO_ERR;
                      return (msg);                            /* Return message received                            */
                  }
                  OSTCBCur->OSTCBStat |= OS_STAT_Q;            /* Task will have to pend for a message to be posted  */
                  OSTCBCur->OSTCBDly   = timeout;              /* Load timeout into TCB                              */
                  OS_EventTaskWait(pevent);                    /* Suspend task until event or timeout occurs         */
                  OS_EXIT_CRITICAL();
                  OS_Sched();                                  /* Find next highest priority task ready to run       */
                  OS_ENTER_CRITICAL();
                  if (OSTCBCur->OSTCBStat & OS_STAT_Q) {       /* Was task readied because of a timeout?             */
                      OS_EventTO(pevent);                      /* Yes                                                */
                      OS_EXIT_CRITICAL();
                      *err = OS_TIMEOUT;                       /*     Indicate a timeout occured                     */
                      return ((void *)0);                      /*     No message received                            */
                  }
                  msg                     = OSTCBCur->OSTCBMsg;/* No, Extract message from TCB (Put there by QPost)  */
                  OSTCBCur->OSTCBMsg      = (void *)0;
                  OSTCBCur->OSTCBStat     = OS_STAT_RDY;
                  OSTCBCur->OSTCBEventPtr = (OS_EVENT *)0;     /*     No longer waiting for event                    */
                  OS_EXIT_CRITICAL();
                  *err                    = OS_NO_ERR;
                  return (msg);                                /*     Return message received                        */
              }
              /*$PAGE*/
              /*
              *********************************************************************************************************
              *                                        POST MESSAGE TO A QUEUE
              *
              * Description: This function sends a message to a queue
              *
              * Arguments  : pevent        is a pointer to the event control block associated with the desired queue
              *
              *              msg           is a pointer to the message to send.  You MUST NOT send a NULL pointer.
              *
              * Returns    : OS_NO_ERR             The call was successful and the message was sent
              *              OS_Q_FULL             If the queue cannot accept any more messages because it is full.
C51 COMPILER V8.05a   OS_Q                                                                 04/11/2007 16:19:49 PAGE 8   

              *              OS_ERR_EVENT_TYPE     If you didn't pass a pointer to a queue.
              *              OS_ERR_PEVENT_NULL    If 'pevent' is a NULL pointer
              *
              * Note(s)    : As of V2.60, this function allows you to send NULL pointer messages.
              *********************************************************************************************************
              */
              
              #if OS_Q_POST_EN > 0
              INT8U  OSQPost (OS_EVENT *pevent, void *msg)
              {
              #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
                  OS_CPU_SR  cpu_sr;
              #endif
                  OS_Q      *pq;
              
              
              #if OS_ARG_CHK_EN > 0
                  if (pevent == (OS_EVENT *)0) {                    /* Validate 'pevent'                             */
                      return (OS_ERR_PEVENT_NULL);
                  }
              #endif
                  if (pevent->OSEventType != OS_EVENT_TYPE_Q) {     /* Validate event block type                     */
                      return (OS_ERR_EVENT_TYPE);
                  }
                  OS_ENTER_CRITICAL();
                  if (pevent->OSEventGrp != 0x00) {                 /* See if any task pending on queue              */
                      OS_EventTaskRdy(pevent, msg, OS_STAT_Q);      /* Ready highest priority task waiting on event  */
                      OS_EXIT_CRITICAL();
                      OS_Sched();                                   /* Find highest priority task ready to run       */
                      return (OS_NO_ERR);
                  }
                  pq = (OS_Q *)pevent->OSEventPtr;                  /* Point to queue control block                  */
                  if (pq->OSQEntries >= pq->OSQSize) {              /* Make sure queue is not full                   */
                      OS_EXIT_CRITICAL();
                      return (OS_Q_FULL);
                  }
                  *pq->OSQIn++ = msg;                               /* Insert message into queue                     */
                  pq->OSQEntries++;                                 /* Update the nbr of entries in the queue        */
                  if (pq->OSQIn == pq->OSQEnd) {                    /* Wrap IN ptr if we are at end of queue         */
                      pq->OSQIn = pq->OSQStart;
                  }
                  OS_EXIT_CRITICAL();
                  return (OS_NO_ERR);
              }
              #endif
              /*$PAGE*/
              /*
              *********************************************************************************************************
              *                                   POST MESSAGE TO THE FRONT OF A QUEUE
              *
              * Description: This function sends a message to a queue but unlike OSQPost(), the message is posted at
              *              the front instead of the end of the queue.  Using OSQPostFront() allows you to send
              *              'priority' messages.
              *
              * Arguments  : pevent        is a pointer to the event control block associated with the desired queue
              *
              *              msg           is a pointer to the message to send.  You MUST NOT send a NULL pointer.
              *
              * Returns    : OS_NO_ERR             The call was successful and the message was sent
              *              OS_Q_FULL             If the queue cannot accept any more messages because it is full.
              *              OS_ERR_EVENT_TYPE     If you didn't pass a pointer to a queue.
              *              OS_ERR_PEVENT_NULL    If 'pevent' is a NULL pointer
C51 COMPILER V8.05a   OS_Q                                                                 04/11/2007 16:19:49 PAGE 9   

              *
              * Note(s)    : As of V2.60, this function allows you to send NULL pointer messages.
              *********************************************************************************************************
              */
              
              #if OS_Q_POST_FRONT_EN > 0
              INT8U  OSQPostFront (OS_EVENT *pevent, void *msg)
              {
              #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
                  OS_CPU_SR  cpu_sr;
              #endif
                  OS_Q      *pq;
              
              
              #if OS_ARG_CHK_EN > 0
                  if (pevent == (OS_EVENT *)0) {                    /* Validate 'pevent'                             */
                      return (OS_ERR_PEVENT_NULL);
                  }
              #endif
                  if (pevent->OSEventType != OS_EVENT_TYPE_Q) {     /* Validate event block type                     */
                      return (OS_ERR_EVENT_TYPE);
                  }
                  OS_ENTER_CRITICAL();
                  if (pevent->OSEventGrp != 0x00) {                 /* See if any task pending on queue              */
                      OS_EventTaskRdy(pevent, msg, OS_STAT_Q);      /* Ready highest priority task waiting on event  */
                      OS_EXIT_CRITICAL();
                      OS_Sched();                                   /* Find highest priority task ready to run       */
                      return (OS_NO_ERR);
                  }
                  pq = (OS_Q *)pevent->OSEventPtr;                  /* Point to queue control block                  */
                  if (pq->OSQEntries >= pq->OSQSize) {              /* Make sure queue is not full                   */
                      OS_EXIT_CRITICAL();
                      return (OS_Q_FULL);
                  }
                  if (pq->OSQOut == pq->OSQStart) {                 /* Wrap OUT ptr if we are at the 1st queue entry */
                      pq->OSQOut = pq->OSQEnd;
                  }
                  pq->OSQOut--;
                  *pq->OSQOut = msg;                                /* Insert message into queue                     */
                  pq->OSQEntries++;                                 /* Update the nbr of entries in the queue        */
                  OS_EXIT_CRITICAL();
                  return (OS_NO_ERR);
              }
              #endif
              /*$PAGE*/
              /*
              *********************************************************************************************************
              *                                        POST MESSAGE TO A QUEUE
              *
              * Description: This function sends a message to a queue.  This call has been added to reduce code size
              *              since it can replace both OSQPost() and OSQPostFront().  Also, this function adds the
              *              capability to broadcast a message to ALL tasks waiting on the message queue.
              *
              * Arguments  : pevent        is a pointer to the event control block associated with the desired queue
              *
              *              msg           is a pointer to the message to send.  You MUST NOT send a NULL pointer.
              *
              *              opt           determines the type of POST performed:
              *                            OS_POST_OPT_NONE         POST to a single waiting task
              *                                                     (Identical to OSQPost())
              *                            OS_POST_OPT_BROADCAST    POST to ALL tasks that are waiting on the queue
              *                            OS_POST_OPT_FRONT        POST as LIFO (Simulates OSQPostFront())
C51 COMPILER V8.05a   OS_Q                                                                 04/11/2007 16:19:49 PAGE 10  

              *
              *                            Below is a list of ALL the possible combination of these flags:
              *
              *                                 1) OS_POST_OPT_NONE
              *                                    identical to OSQPost()
              *
              *                                 2) OS_POST_OPT_FRONT
              *                                    identical to OSQPostFront()
              *
              *                                 3) OS_POST_OPT_BROADCAST
              *                                    identical to OSQPost() but will broadcast 'msg' to ALL waiting tasks
              *
              *                                 4) OS_POST_OPT_FRONT + OS_POST_OPT_BROADCAST  is identical to
              *                                    OSQPostFront() except that will broadcast 'msg' to ALL waiting tasks
              *
              * Returns    : OS_NO_ERR             The call was successful and the message was sent
              *              OS_Q_FULL             If the queue cannot accept any more messages because it is full.
              *              OS_ERR_EVENT_TYPE     If you didn't pass a pointer to a queue.
              *              OS_ERR_PEVENT_NULL    If 'pevent' is a NULL pointer
              *              OS_ERR_POST_NULL_PTR  If you are attempting to post a NULL pointer
              *
              * Warning    : Interrupts can be disabled for a long time if you do a 'broadcast'.  In fact, the
              *              interrupt disable time is proportional to the number of tasks waiting on the queue.
              *********************************************************************************************************
              */
              
              #if OS_Q_POST_OPT_EN > 0
              INT8U  OSQPostOpt (OS_EVENT *pevent, void *msg, INT8U opt)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
最新高清无码专区| 91在线你懂得| 色诱视频网站一区| 日韩免费观看高清完整版在线观看| 国产喂奶挤奶一区二区三区| 午夜精品影院在线观看| 北条麻妃一区二区三区| 欧美mv日韩mv亚洲| 亚洲va天堂va国产va久| 97成人超碰视| 国产欧美精品国产国产专区| 日本美女一区二区| 欧美在线免费播放| 亚洲视频狠狠干| 国产精品亚洲人在线观看| 制服丝袜av成人在线看| 亚洲激情av在线| eeuss影院一区二区三区| 2023国产精品视频| 奇米影视7777精品一区二区| 欧美三级视频在线| 一区二区国产盗摄色噜噜| 成人av在线资源网站| 久久久久国产精品人| 蜜臀精品一区二区三区在线观看| 欧美日韩免费视频| 亚洲欧美在线视频观看| 成人99免费视频| 亚洲成人你懂的| 99久久久国产精品| 国产精品久久免费看| 成人理论电影网| 国产精品久久久久久福利一牛影视 | 日韩成人伦理电影在线观看| 色老综合老女人久久久| 亚洲欧美日韩国产另类专区| 99精品国产视频| 亚洲精品综合在线| 欧洲色大大久久| 亚洲va中文字幕| 日韩一级二级三级| 国产主播一区二区| 中文字幕欧美日韩一区| 91麻豆国产香蕉久久精品| 亚洲精品综合在线| 欧美精品一卡二卡| 久久精品国产久精国产| 久久久精品综合| 99久久免费国产| 亚洲成人高清在线| 日韩欧美视频在线| 成人一道本在线| 一区二区三区四区中文字幕| 欧美无砖专区一中文字| 久久精品国产99| 国产日韩欧美在线一区| 99精品视频一区| 亚洲成av人影院| 精品国偷自产国产一区| 波波电影院一区二区三区| 亚洲福利视频一区二区| 精品国产成人在线影院| 91原创在线视频| 日韩高清欧美激情| 国产精品久久久久久久第一福利| 欧美丝袜丝nylons| 国产精品1区2区3区在线观看| 国产精品白丝在线| 欧美一区二区在线观看| 粉嫩aⅴ一区二区三区四区五区| 亚洲免费三区一区二区| 日韩一级二级三级| 色一情一伦一子一伦一区| 麻豆成人久久精品二区三区红| 国产精品视频一二| 91麻豆精品国产综合久久久久久| 国产成人小视频| 日韩高清欧美激情| 亚洲美女一区二区三区| 久久午夜老司机| 欧美日韩一级黄| 成人一区二区三区视频在线观看| 五月天精品一区二区三区| 国产欧美精品一区二区色综合朱莉| 欧美日韩不卡视频| 91老司机福利 在线| 国精产品一区一区三区mba视频| 成人看片黄a免费看在线| 日本成人在线不卡视频| 综合激情成人伊人| 2017欧美狠狠色| 欧美一区二区三区免费| 91麻豆高清视频| 成熟亚洲日本毛茸茸凸凹| 免费看欧美女人艹b| 亚洲一级二级在线| 亚洲欧美视频在线观看视频| 中文字幕第一区| 久久久综合激的五月天| 欧美一区三区二区| 制服丝袜av成人在线看| 欧美伦理影视网| 欧美亚洲综合久久| 欧美亚洲自拍偷拍| 日本道精品一区二区三区 | 国产精品青草久久| 久久久久久免费毛片精品| 91精品国产乱码| 欧美老肥妇做.爰bbww视频| 一本久久精品一区二区| 97精品国产露脸对白| 91视频观看视频| 成人精品视频.| 99久久精品免费看| 95精品视频在线| 在线亚洲一区二区| 91高清视频免费看| 精品视频免费看| 欧美美女直播网站| 欧美一区二区三区精品| 日韩一区二区电影网| 精品国产三级电影在线观看| 2020国产精品自拍| 欧美国产精品中文字幕| 亚洲视频电影在线| 午夜一区二区三区视频| 日韩和欧美一区二区三区| 欧美aaa在线| 国产精品一区在线| 成人黄色一级视频| 欧日韩精品视频| 欧美一卡2卡3卡4卡| 欧美精品一区二区三区蜜桃视频| xvideos.蜜桃一区二区| 国产精品色眯眯| 亚洲一区在线观看视频| 亚洲gay无套男同| 国产自产v一区二区三区c| 成人av电影观看| 欧美日韩一区二区欧美激情| 日韩欧美你懂的| 中文字幕制服丝袜成人av| 怡红院av一区二区三区| 美女网站色91| 成人美女在线观看| 欧美精品日韩精品| 久久午夜老司机| 亚洲一区二区视频| 精品一区二区日韩| 色婷婷激情久久| 精品国产污网站| 一区二区三区在线免费播放| 精品影院一区二区久久久| 成人激情视频网站| 日韩一区二区三区在线观看| 国产精品久久久久久久蜜臀 | 国内精品久久久久影院薰衣草| 99精品视频免费在线观看| 欧美疯狂做受xxxx富婆| 亚洲国产成人自拍| 日韩成人一级大片| 91久久一区二区| 欧美国产精品久久| 蜜臀av性久久久久av蜜臀妖精| 成人深夜视频在线观看| 欧美一区二区黄色| 一级中文字幕一区二区| 国产黄色精品视频| 91精品国产综合久久精品| 亚洲视频免费在线观看| 国产一区在线观看麻豆| 欧美日韩国产免费| 中文字幕一区二区三区四区不卡| 麻豆国产一区二区| 欧美日韩在线电影| 亚洲视频免费看| a在线欧美一区| 久久免费午夜影院| 久久国产精品免费| 在线不卡一区二区| 一区二区三区不卡在线观看| 国产又黄又大久久| 日韩精品在线一区| 日日嗨av一区二区三区四区| 色婷婷亚洲婷婷| 亚洲欧美在线视频观看| 丁香激情综合国产| 国产人成亚洲第一网站在线播放| 久久精品国产99久久6| 日韩一区国产二区欧美三区| 日韩电影在线观看一区| 欧美精品自拍偷拍| 午夜精品久久久久久久久| 欧美日韩一级黄| 肉肉av福利一精品导航| 欧美一级日韩不卡播放免费| 五月婷婷综合激情| 91精品中文字幕一区二区三区| 午夜精品免费在线| 欧美大片在线观看一区二区|