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

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

?? os_sem.lst

?? uCos-ii 2.86 在C8051F410單片機上移植成功!!! 其中包括:UART驅動
?? LST
?? 第 1 頁 / 共 3 頁
字號:
C51 COMPILER V8.17   OS_SEM                                                                03/26/2009 14:24:25 PAGE 1   


C51 COMPILER V8.17, COMPILATION OF MODULE OS_SEM
OBJECT MODULE PLACED IN .\out-files\os_sem.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE uCOS II Files\os_sem.c LARGE BROWSE INCDIR(.\smaRTC;.\SMBus) DEBUG OBJECTEX
                    -TEND PRINT(.\list-files\os_sem.lst) TABS(2) OBJECT(.\out-files\os_sem.obj)

line level    source

   1          /*
   2          *********************************************************************************************************
   3          *                                                uC/OS-II
   4          *                                          The Real-Time Kernel
   5          *                                          SEMAPHORE MANAGEMENT
   6          *
   7          *                              (c) Copyright 1992-2007, Micrium, Weston, FL
   8          *                                           All Rights Reserved
   9          *
  10          * File    : OS_SEM.C
  11          * By      : Jean J. Labrosse
  12          * Version : V2.86
  13          *
  14          * LICENSING TERMS:
  15          * ---------------
  16          *   uC/OS-II is provided in source form for FREE evaluation, for educational use or for peaceful research.
             -  
  17          * If you plan on using  uC/OS-II  in a commercial product you need to contact Micri祄 to properly license 
  18          * its use in your product. We provide ALL the source code for your convenience and to help you experience 
  19          * uC/OS-II.   The fact that the  source is provided does  NOT  mean that you can use it without  paying a 
  20          * licensing fee.
  21          *********************************************************************************************************
  22          */
  23          
  24          #ifndef  OS_MASTER_FILE
  25          #include "..\header files\includes.h"
  26          #endif
  27          
  28          #if OS_SEM_EN > 0
  29          /*$PAGE*/
  30          /*
  31          *********************************************************************************************************
  32          *                                           ACCEPT SEMAPHORE
  33          *
  34          * Description: This function checks the semaphore to see if a resource is available or, if an event
  35          *              occurred.  Unlike OSSemPend(), OSSemAccept() does not suspend the calling task if the
  36          *              resource is not available or the event did not occur.
  37          *
  38          * Arguments  : pevent     is a pointer to the event control block
  39          *
  40          * Returns    : >  0       if the resource is available or the event did not occur the semaphore is
  41          *                         decremented to obtain the resource.
  42          *              == 0       if the resource is not available or the event did not occur or,
  43          *                         if 'pevent' is a NULL pointer or,
  44          *                         if you didn't pass a pointer to a semaphore
  45          *********************************************************************************************************
  46          */
  47          
  48          #if OS_SEM_ACCEPT_EN > 0
              INT16U  OSSemAccept (OS_EVENT *pevent) reentrant
              {
                  INT16U     cnt;
              #if OS_CRITICAL_METHOD == 3                           /* Allocate storage for CPU status register      */
                  OS_CPU_SR  cpu_sr = 0;
C51 COMPILER V8.17   OS_SEM                                                                03/26/2009 14:24:25 PAGE 2   

              #endif
              
              
              
              #if OS_ARG_CHK_EN > 0
                  if (pevent == (OS_EVENT *)0) {                    /* Validate 'pevent'                             */
                      return (0);
                  }
              #endif
                  if (pevent->OSEventType != OS_EVENT_TYPE_SEM) {   /* Validate event block type                     */
                      return (0);
                  }
                  OS_ENTER_CRITICAL();
                  cnt = pevent->OSEventCnt;
                  if (cnt > 0) {                                    /* See if resource is available                  */
                      pevent->OSEventCnt--;                         /* Yes, decrement semaphore and notify caller    */
                  }
                  OS_EXIT_CRITICAL();
                  return (cnt);                                     /* Return semaphore count                        */
              }
              #endif
  75          
  76          /*$PAGE*/
  77          /*
  78          *********************************************************************************************************
  79          *                                           CREATE A SEMAPHORE
  80          *
  81          * Description: This function creates a semaphore.
  82          *
  83          * Arguments  : cnt           is the initial value for the semaphore.  If the value is 0, no resource is
  84          *                            available (or no event has occurred).  You initialize the semaphore to a
  85          *                            non-zero value to specify how many resources are available (e.g. if you have
  86          *                            10 resources, you would initialize the semaphore to 10).
  87          *
  88          * Returns    : != (void *)0  is a pointer to the event control block (OS_EVENT) associated with the
  89          *                            created semaphore
  90          *              == (void *)0  if no event control blocks were available
  91          *********************************************************************************************************
  92          */
  93          
  94          OS_EVENT  *OSSemCreate (INT16U cnt) reentrant
  95          {
  96   1          OS_EVENT  *pevent;
  97   1      #if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
                  OS_CPU_SR  cpu_sr = 0;
              #endif
 100   1      
 101   1      
 102   1      
 103   1          if (OSIntNesting > 0) {                                /* See if called from ISR ...               */
 104   2              return ((OS_EVENT *)0);                            /* ... can't CREATE from an ISR             */
 105   2          }
 106   1          OS_ENTER_CRITICAL();
 107   1          pevent = OSEventFreeList;                              /* Get next free event control block        */
 108   1          if (OSEventFreeList != (OS_EVENT *)0) {                /* See if pool of free ECB pool was empty   */
 109   2              OSEventFreeList = (OS_EVENT *)OSEventFreeList->OSEventPtr;
 110   2          }
 111   1          OS_EXIT_CRITICAL();
 112   1          if (pevent != (OS_EVENT *)0) {                         /* Get an event control block               */
 113   2              pevent->OSEventType    = OS_EVENT_TYPE_SEM;
 114   2              pevent->OSEventCnt     = cnt;                      /* Set semaphore value                      */
 115   2              pevent->OSEventPtr     = (void *)0;                /* Unlink from ECB free list                */
C51 COMPILER V8.17   OS_SEM                                                                03/26/2009 14:24:25 PAGE 3   

 116   2      #if OS_EVENT_NAME_SIZE > 1
                      pevent->OSEventName[0] = '?';                      /* Unknown name                             */
                      pevent->OSEventName[1] = OS_ASCII_NUL;
              #endif
 120   2              OS_EventWaitListInit(pevent);                      /* Initialize to 'nobody waiting' on sem.   */
 121   2          }
 122   1          return (pevent);
 123   1      }
 124          
 125          /*$PAGE*/
 126          /*
 127          *********************************************************************************************************
 128          *                                         DELETE A SEMAPHORE
 129          *
 130          * Description: This function deletes a semaphore and readies all tasks pending on the semaphore.
 131          *
 132          * Arguments  : pevent        is a pointer to the event control block associated with the desired
 133          *                            semaphore.
 134          *
 135          *              opt           determines delete options as follows:
 136          *                            opt == OS_DEL_NO_PEND   Delete semaphore ONLY if no task pending
 137          *                            opt == OS_DEL_ALWAYS    Deletes the semaphore even if tasks are waiting.
 138          *                                                    In this case, all the tasks pending will be readied.
 139          *
 140          *              perr          is a pointer to an error code that can contain one of the following values:
 141          *                            OS_ERR_NONE             The call was successful and the semaphore was deleted
 142          *                            OS_ERR_DEL_ISR          If you attempted to delete the semaphore from an ISR
 143          *                            OS_ERR_INVALID_OPT      An invalid option was specified
 144          *                            OS_ERR_TASK_WAITING     One or more tasks were waiting on the semaphore
 145          *                            OS_ERR_EVENT_TYPE       If you didn't pass a pointer to a semaphore
 146          *                            OS_ERR_PEVENT_NULL      If 'pevent' is a NULL pointer.
 147          *
 148          * Returns    : pevent        upon error
 149          *              (OS_EVENT *)0 if the semaphore was successfully deleted.
 150          *
 151          * Note(s)    : 1) This function must be used with care.  Tasks that would normally expect the presence of
 152          *                 the semaphore MUST check the return code of OSSemPend().
 153          *              2) OSSemAccept() callers will not know that the intended semaphore has been deleted unless
 154          *                 they check 'pevent' to see that it's a NULL pointer.
 155          *              3) This call can potentially disable interrupts for a long time.  The interrupt disable
 156          *                 time is directly proportional to the number of tasks waiting on the semaphore.
 157          *              4) Because ALL tasks pending on the semaphore will be readied, you MUST be careful in
 158          *                 applications where the semaphore is used for mutual exclusion because the resource(s)
 159          *                 will no longer be guarded by the semaphore.
 160          *********************************************************************************************************
 161          */
 162          
 163          #if OS_SEM_DEL_EN > 0
              OS_EVENT  *OSSemDel (OS_EVENT *pevent, INT8U opt, INT8U *perr) reentrant
              {
                  BOOLEAN    tasks_waiting;
                  OS_EVENT  *pevent_return;
              #if OS_CRITICAL_METHOD == 3                                /* Allocate storage for CPU status register */
                  OS_CPU_SR  cpu_sr = 0;
              #endif
              
              
              
              #if OS_ARG_CHK_EN > 0
                  if (perr == (INT8U *)0) {                              /* Validate 'perr'                          */
                      return (pevent);
                  }
C51 COMPILER V8.17   OS_SEM                                                                03/26/2009 14:24:25 PAGE 4   

                  if (pevent == (OS_EVENT *)0) {                         /* Validate 'pevent'                        */
                      *perr = OS_ERR_PEVENT_NULL;
                      return (pevent);
                  }
              #endif
                  if (pevent->OSEventType != OS_EVENT_TYPE_SEM) {        /* Validate event block type                */
                      *perr = OS_ERR_EVENT_TYPE;
                      return (pevent);
                  }
                  if (OSIntNesting > 0) {                                /* See if called from ISR ...               */
                      *perr = OS_ERR_DEL_ISR;                             /* ... can't DELETE from an ISR             */
                      return (pevent);
                  }
                  OS_ENTER_CRITICAL();
                  if (pevent->OSEventGrp != 0) {                         /* See if any tasks waiting on semaphore    */
                      tasks_waiting = OS_TRUE;                           /* Yes                                      */
                  } else {
                      tasks_waiting = OS_FALSE;                          /* No                                       */
                  }
                  switch (opt) {
                      case OS_DEL_NO_PEND:                               /* Delete semaphore only if no task waiting */
                           if (tasks_waiting == OS_FALSE) {
              #if OS_EVENT_NAME_SIZE > 1
                               pevent->OSEventName[0] = '?';             /* Unknown name                             */
                               pevent->OSEventName[1] = OS_ASCII_NUL;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
白白色 亚洲乱淫| 欧美影视一区二区三区| 亚洲免费在线看| 久久精品人人做| 精品国产电影一区二区| 日韩免费高清视频| 2020国产精品自拍| 久久精品人人做| 日本一区二区三区四区| 亚洲国产另类av| 日本最新不卡在线| 国产精品一区一区三区| 懂色av一区二区三区蜜臀| 91欧美激情一区二区三区成人| 欧美三级欧美一级| 精品国产乱码久久久久久牛牛 | 中文字幕日韩一区二区| 久久久久高清精品| 久久成人综合网| 亚洲欧美在线观看| 亚洲一区二区三区小说| 欧美蜜桃一区二区三区| 欧洲国内综合视频| 欧美日韩一区二区三区在线看 | 美女久久久精品| 国产毛片一区二区| 国产午夜精品久久久久久久| a在线播放不卡| 日韩精彩视频在线观看| 欧美极品美女视频| 中文字幕第一区| 91精品国模一区二区三区| 成人午夜在线免费| 欧美一区二区视频网站| 国产精品美女www爽爽爽| 另类中文字幕网| 色播五月激情综合网| 中文字幕综合网| 麻豆精品在线观看| 欧美精品一区二区在线播放| 欧美日韩国产一级片| 成人精品国产福利| 偷拍一区二区三区| 国产日韩欧美高清| 欧美另类久久久品| 在线免费观看日本欧美| 粉嫩在线一区二区三区视频| 奇米色一区二区三区四区| 亚洲欧美二区三区| 亚洲国产精品二十页| 日韩一级免费观看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 国产一区二区三区在线观看免费 | 1区2区3区欧美| 精品国产免费人成在线观看| 欧洲生活片亚洲生活在线观看| 国产精品66部| 久久疯狂做爰流白浆xx| 三级一区在线视频先锋| 一区二区三区欧美激情| 国产精品久久免费看| 久久一区二区三区国产精品| 日韩亚洲欧美一区二区三区| 91国产福利在线| 日韩免费观看2025年上映的电影| 日韩一区二区在线播放| 欧美精品免费视频| 另类小说视频一区二区| 精品国产污污免费网站入口 | 91免费观看视频在线| 国产做a爰片久久毛片| 精品在线视频一区| 美女性感视频久久| 91福利社在线观看| 精品国产乱码久久久久久久久| 亚洲欧美一区二区三区国产精品 | 一区二区三区欧美久久| 日韩欧美一区在线| 91麻豆精品国产综合久久久久久| 91麻豆高清视频| 色噜噜久久综合| 国内一区二区在线| 777xxx欧美| 欧美日韩aaaaaa| 69av一区二区三区| 欧美疯狂做受xxxx富婆| 欧美精品黑人性xxxx| 日韩免费电影一区| 久久婷婷成人综合色| 亚洲国产精品v| 成人免费在线观看入口| 亚洲综合无码一区二区| 亚洲国产日韩精品| 麻豆成人91精品二区三区| 精品在线免费视频| 成人性生交大合| 一本久久a久久免费精品不卡| 欧美最猛黑人xxxxx猛交| 4hu四虎永久在线影院成人| 欧美一级片在线| 国产无遮挡一区二区三区毛片日本| 国产人久久人人人人爽| 国产欧美久久久精品影院| 亚洲国产视频在线| 99国产精品久| 国产成人在线免费观看| 麻豆91在线观看| 国产不卡在线播放| 色综合亚洲欧洲| 日韩精品资源二区在线| 亚洲狠狠爱一区二区三区| 欧美刺激午夜性久久久久久久| 亚洲综合免费观看高清在线观看| 4438亚洲最大| 成人国产精品免费观看| 国产精品美女一区二区三区| 欧美最新大片在线看 | 久久精品av麻豆的观看方式| 国产一区二区三区| 欧美日本一区二区在线观看| 亚洲另类在线视频| 懂色一区二区三区免费观看| 欧美一个色资源| 亚洲二区在线观看| 成人美女在线视频| 欧洲一区在线电影| 久久99精品网久久| 色视频欧美一区二区三区| 欧美大片拔萝卜| 一区二区三区免费观看| 国产一区二区电影| 欧洲一区在线电影| 亚洲国产高清在线| 日韩成人一级大片| av网站免费线看精品| 日韩精品一区二区三区三区免费| 中文字幕日韩精品一区 | 亚洲男人天堂av| 国产精品1区2区| 337p亚洲精品色噜噜| 亚洲一区二区三区四区五区中文| 国内外精品视频| 日韩久久久久久| 日韩高清一级片| 在线观看日韩高清av| 国产区在线观看成人精品| 日本成人在线视频网站| 欧美日韩视频在线第一区| 国产精品久久久久久久久免费樱桃| 久久99这里只有精品| 欧美精品久久一区二区三区| 一区二区三区成人| 91欧美激情一区二区三区成人| 国产亚洲精品超碰| 捆绑调教一区二区三区| 欧美一区2区视频在线观看| 亚洲一区二区三区不卡国产欧美| av男人天堂一区| 国产精品国产三级国产三级人妇| 国产精品911| 国产日韩精品一区二区三区 | 91色在线porny| 国产精品你懂的在线欣赏| 国产精品综合视频| 精品第一国产综合精品aⅴ| 蜜臀精品一区二区三区在线观看| 欧美顶级少妇做爰| 丝袜美腿高跟呻吟高潮一区| 欧美二区三区91| 日韩中文字幕91| 日韩一区二区精品葵司在线| 日本视频在线一区| 日韩欧美国产麻豆| 久久国产尿小便嘘嘘| 久久中文娱乐网| 成人少妇影院yyyy| 国产精品久久久久四虎| 色香蕉成人二区免费| 亚洲欧美日韩国产一区二区三区| 一本大道久久a久久精二百| 一区二区三区.www| 欧美日韩成人高清| 久久99国产精品免费网站| 久久综合久久99| 99精品视频在线播放观看| 亚洲美女精品一区| 777亚洲妇女| 国产精品亚洲一区二区三区在线| 欧美激情资源网| 欧美图区在线视频| 喷白浆一区二区| 久久久久久久精| 91小视频免费观看| 亚洲国产欧美在线| 久久久亚洲午夜电影| av在线不卡观看免费观看| 亚洲成人激情自拍| 久久午夜免费电影| 欧美中文字幕一区二区三区亚洲| 久久精品国产亚洲高清剧情介绍|