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

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

?? smc.c

?? 基于OMAP1510的Nucleus移植代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*************************************************************************/
/*                                                                       */
/*               Copyright Mentor Graphics Corporation 2002              */
/*                         All Rights Reserved.                          */
/*                                                                       */
/* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS  */
/* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS   */
/* SUBJECT TO LICENSE TERMS.                                             */
/*                                                                       */
/*************************************************************************/

/*************************************************************************/
/*                                                                       */
/* FILE NAME                                               VERSION       */
/*                                                                       */
/*      smc.c                                          Nucleus PLUS 1.14 */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      SM - Semaphore Management                                        */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This file contains the core routines for the Semaphore Management*/
/*      component.                                                       */
/*                                                                       */
/* DATA STRUCTURES                                                       */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* FUNCTIONS                                                             */
/*                                                                       */
/*      SMC_Create_Semaphore                Create a semaphore           */
/*      SMC_Delete_Semaphore                Delete a semaphore           */
/*      SMC_Obtain_Semaphore                Obtain instance of semaphore */
/*      SMC_Release_Semaphore               Release instance of semaphore*/
/*      SMC_Cleanup                         Cleanup on timeout or a      */
/*                                            terminate condition        */
/*                                                                       */
/* DEPENDENCIES                                                          */
/*                                                                       */
/*      cs_extr.h                           Common Service functions     */
/*      tc_extr.h                           Thread Control functions     */
/*      sm_extr.h                           Semaphore functions          */
/*      hi_extr.h                           History functions            */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*         DATE                    REMARKS                               */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*      08-09-1993      Corrected pointer retrieval                      */
/*                      loop, resulting in version 1.0a                  */
/*      08-09-1993      Verified version 1.0a                            */
/*      03-01-1994      Moved non-core functions into                    */
/*                      supplemental files, changed                      */
/*                      function interfaces to match                     */
/*                      those in prototype, added                        */
/*                      register options, changed                        */
/*                      protection logic to reduce                       */
/*                      overhead, resulting in                           */
/*                      version 1.1                                      */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*      04-17-1996      updated to version 1.2                           */
/*      03-24-1998      Released version 1.3                             */
/*      03-26-1999      Released 1.11m (new release                      */
/*                        numbering scheme)                              */
/*      04-17-2002      Released version 1.13m                           */
/*      11-07-2002      Released version 1.14                            */
/*************************************************************************/
#define         NU_SOURCE_FILE


#include        "cs_extr.h"                 /* Common service functions  */
#include        "tc_extr.h"                 /* Thread control functions  */
#include        "sm_extr.h"                 /* Semaphore functions       */
#include        "hi_extr.h"                 /* History functions         */
#include        "profiler.h"                /* ProView interface         */


/* Define external inner-component global data references.  */

extern CS_NODE         *SMD_Created_Semaphores_List;
extern UNSIGNED         SMD_Total_Semaphores;
extern TC_PROTECT       SMD_List_Protect;


/* Define internal component function prototypes.  */

VOID    SMC_Cleanup(VOID *information);


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      SMC_Create_Semaphore                                             */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function creates a semaphore and then places it on the list */
/*      of created semaphores.                                           */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      SMCE_Create_Semaphore               Error checking shell         */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      CSC_Place_On_List                   Add node to linked-list      */
/*      [HIC_Make_History_Entry]            Make entry in history log    */
/*      [TCT_Check_Stack]                   Stack checking function      */
/*      TCT_Protect                         Data structure protect       */
/*      TCT_Unprotect                       Un-protect data structure    */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      semaphore_ptr                       Semaphore control block ptr  */
/*      name                                Semaphore name               */
/*      initial_count                       Initial semaphore instance   */
/*                                            count                      */
/*      suspend_type                        Suspension type              */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      NU_SUCCESS                                                       */
/*                                                                       */
/* HISTORY                                                               */
/*                                                                       */
/*        DATE                    REMARKS                                */
/*                                                                       */
/*      03-01-1993      Created initial version 1.0                      */
/*      04-19-1993      Verified version 1.0                             */
/*      03-01-1994      Changed function interfaces to                   */
/*                      match those in prototype,                        */
/*                      added register options,                          */
/*                      resulting in version 1.1                         */
/*                                                                       */
/*      03-18-1994      Verified version 1.1                             */
/*                                                                       */
/*************************************************************************/
STATUS  SMC_Create_Semaphore(NU_SEMAPHORE *semaphore_ptr, CHAR *name,
                           UNSIGNED initial_count, OPTION suspend_type)
{

R1 SM_SCB      *semaphore;                  /* Semaphore control blk ptr */
INT             i;                          /* Working index variable    */
NU_SUPERV_USER_VARIABLES

    /* Switch to supervisor mode */
    NU_SUPERVISOR_MODE();

    /* Move input semaphore pointer into internal pointer.  */
    semaphore =  (SM_SCB *) semaphore_ptr;


#ifdef  NU_ENABLE_STACK_CHECK

    /* Call stack checking function to check for an overflow condition.  */
    TCT_Check_Stack();

#endif

#ifdef  NU_ENABLE_HISTORY

    /* Make an entry that corresponds to this function in the system history
       log.  */
    HIC_Make_History_Entry(NU_CREATE_SEMAPHORE_ID, (UNSIGNED) semaphore,
                                (UNSIGNED) name, (UNSIGNED) initial_count);

#endif

    /* First, clear the semaphore ID just in case it is an old Semaphore
       Control Block.  */
    semaphore -> sm_id =             0;

    /* Fill in the semaphore name.  */
    for (i = 0; i < NU_MAX_NAME; i++)
        semaphore -> sm_name[i] =  name[i];

    /* Setup the initial semaphore instance count.  */
    semaphore -> sm_semaphore_count =  initial_count;

    /* Setup the semaphore suspension type.  */
    if (suspend_type == NU_FIFO)

        /* FIFO suspension is selected, setup the flag accordingly.  */
        semaphore -> sm_fifo_suspend =  NU_TRUE;
    else

        /* Priority suspension is selected.  */
        semaphore -> sm_fifo_suspend =  NU_FALSE;

    /* Clear the suspension list pointer.  */
    semaphore -> sm_suspension_list =  NU_NULL;

    /* Clear the number of tasks waiting on the semaphore counter.  */
    semaphore -> sm_tasks_waiting =  0;

    /* Initialize link pointers.  */
    semaphore -> sm_created.cs_previous =    NU_NULL;
    semaphore -> sm_created.cs_next =        NU_NULL;

    /* Protect against access to the list of created semaphores.  */
    TCT_Protect(&SMD_List_Protect);

    /* At this point the semaphore is completely built.  The ID can now be
       set and it can be linked into the created semaphore list.  */
    semaphore -> sm_id =  SM_SEMAPHORE_ID;

    /* Link the semaphore into the list of created semaphores and increment the
       total number of semaphores in the system.  */
    CSC_Place_On_List(&SMD_Created_Semaphores_List,&(semaphore -> sm_created));
    SMD_Total_Semaphores++;

#ifdef INCLUDE_PROVIEW
    _RTProf_DumpSema(RT_PROF_CREATE_SEMAPHORE,semaphore, RT_PROF_OK);
#endif

    /* Release protection against access to the list of created semaphores.  */
    TCT_Unprotect();

    /* Return to user mode */
    NU_USER_MODE();

    /* Return successful completion.  */
    return(NU_SUCCESS);
}


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      SMC_Delete_Semaphore                                             */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function deletes a semaphore and removes it from the list   */
/*      of created semaphores.  All tasks suspended on the semaphore are */
/*      resumed.  Note that this function does not free the memory       */
/*      associated with the semaphore control block.                     */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      SMCE_Delete_Semaphore               Error checking shell         */
/*                                                                       */
/* CALLS                                                                 */
/*                                                                       */
/*      CSC_Remove_From_List                Remove node from list        */
/*      [HIC_Make_History_Entry]            Make entry in history log    */
/*      TCC_Resume_Task                     Resume a suspended task      */
/*      [TCT_Check_Stack]                   Stack checking function      */
/*      TCT_Control_To_System               Transfer control to system   */
/*      TCT_Protect                         Protect created list         */
/*      TCT_Set_Current_Protect             Modify current protection    */
/*      TCT_System_Protect                  Setup system protection      */
/*      TCT_System_Unprotect                Release system protection    */
/*      TCT_Unprotect                       Release protection           */
/*                                                                       */
/* INPUTS                                                                */
/*                                                                       */
/*      semaphore_ptr                       Semaphore control block ptr  */
/*                                                                       */
/* OUTPUTS                                                               */
/*                                                                       */
/*      NU_SUCCESS                                                       */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美精品一区二区色综合| 亚洲视频一区二区在线| 成人深夜视频在线观看| 亚洲伊人伊色伊影伊综合网| 久久欧美一区二区| 欧美另类z0zxhd电影| 99麻豆久久久国产精品免费优播| 麻豆一区二区99久久久久| 亚洲乱码国产乱码精品精可以看| 91精品国产综合久久精品图片 | 成人涩涩免费视频| 青青草伊人久久| 亚洲精品乱码久久久久久黑人| 欧美精品一区二区三区很污很色的| 在线观看国产日韩| 成人的网站免费观看| 国内精品自线一区二区三区视频| 亚洲国产精品嫩草影院| 亚洲同性同志一二三专区| 欧美精品一区二区三| 欧美日本在线一区| 91福利视频在线| 一本色道**综合亚洲精品蜜桃冫| 国产成人精品1024| 国产精品一区二区在线播放| 日韩高清一区在线| 亚洲成人综合在线| 亚洲一区二区三区小说| 亚洲婷婷国产精品电影人久久| 中文一区在线播放| 国产日韩综合av| 欧美精品一区二| 欧美大片拔萝卜| 日韩欧美资源站| 日韩欧美国产三级电影视频| 在线电影一区二区三区| 欧美日韩国产a| 欧美体内she精高潮| 在线观看欧美黄色| 欧美日韩精品一区二区天天拍小说 | 欧洲精品视频在线观看| 色先锋aa成人| 欧洲视频一区二区| 欧美亚洲综合久久| 欧美性极品少妇| 欧美日韩日日骚| 欧美浪妇xxxx高跟鞋交| 欧美肥胖老妇做爰| 日韩一区二区免费在线观看| 日韩三级电影网址| 久久久久久久久伊人| 国产欧美日韩不卡免费| 亚洲手机成人高清视频| 亚洲综合在线五月| 青娱乐精品视频| 国产一区二区影院| 99久久精品久久久久久清纯| 91无套直看片红桃| 欧美亚一区二区| 91精选在线观看| 精品av久久707| 国产精品久久99| 一区二区日韩av| 喷白浆一区二区| 国产精品99久久久久久有的能看| 成人黄色小视频| 在线观看av不卡| 91精品国产全国免费观看| 欧美大片拔萝卜| 中文字幕一区av| 偷窥国产亚洲免费视频| 国产一区二区视频在线| 99久久99久久精品国产片果冻| 欧美日韩综合在线| 精品国产99国产精品| 中文字幕一区二区三区不卡在线 | 国产一区二区三区久久久| 国产高清久久久| 色综合网色综合| 日韩一卡二卡三卡四卡| 中文字幕在线一区免费| 日本在线不卡视频| 成人毛片在线观看| 欧美一区二区三区在线视频| 国产精品久久久久久久久久久免费看| 亚洲日本乱码在线观看| 蜜桃久久久久久久| 色婷婷综合久色| 精品福利av导航| 日韩毛片在线免费观看| 久久99国产精品久久99| 91欧美激情一区二区三区成人| 欧美三级欧美一级| 国产精品免费人成网站| 奇米精品一区二区三区四区| 一本色道久久综合亚洲91| 久久综合九色综合久久久精品综合| 一区二区在线观看av| 狠狠v欧美v日韩v亚洲ⅴ| 欧美日韩精品欧美日韩精品一| 日本一区二区三区免费乱视频| 亚洲r级在线视频| 成人国产在线观看| 精品久久久久久久一区二区蜜臀| 亚洲欧美激情一区二区| 国产一区二区精品久久91| 欧美日韩一区 二区 三区 久久精品 | 日本精品视频一区二区| 久久久久久久久97黄色工厂| 日韩成人精品在线| 色视频欧美一区二区三区| 国产农村妇女精品| 久久成人久久爱| 欧美精品一级二级三级| 一区二区三区在线观看欧美| 成人午夜在线播放| 欧美tickle裸体挠脚心vk| 亚洲一区中文日韩| 一本一本大道香蕉久在线精品| 日本一区二区三区dvd视频在线| 日韩电影免费在线| 欧美美女直播网站| 亚洲一区二区视频在线| 色婷婷久久一区二区三区麻豆| 亚洲国产精品二十页| 国产一区在线精品| 久久亚洲春色中文字幕久久久| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美综合一区二区| 亚洲六月丁香色婷婷综合久久 | 久久精品国产网站| 欧美精品久久99久久在免费线| 尤物视频一区二区| 欧美午夜精品一区二区蜜桃| 一区二区不卡在线视频 午夜欧美不卡在 | 蜜臀国产一区二区三区在线播放 | 成人av在线播放网址| 日本一二三不卡| 波多野结衣的一区二区三区| 中文在线一区二区| 91麻豆福利精品推荐| 中文字幕制服丝袜一区二区三区| 99精品偷自拍| 亚洲欧美国产三级| 色视频欧美一区二区三区| 亚洲午夜国产一区99re久久| 欧美色成人综合| 亚洲成a人片综合在线| 欧美精品18+| 久久精品国产秦先生| 99re亚洲国产精品| 欧美日韩一区二区电影| 欧美高清激情brazzers| 99久久婷婷国产综合精品电影 | 国产精品影视网| 亚洲精品va在线观看| 日韩一级成人av| 欧美国产国产综合| 亚洲欧美电影一区二区| 精品久久久久久久一区二区蜜臀| 欧美日韩国产精品自在自线| 91啪亚洲精品| 欧美午夜片在线观看| 高清不卡在线观看av| 久久精品水蜜桃av综合天堂| 6080国产精品一区二区| 欧洲精品中文字幕| 欧美日韩亚洲综合在线 | 国产精品麻豆视频| 欧美三级韩国三级日本三斤 | 国产亚洲欧美日韩在线一区| 欧美色网站导航| 欧美日本一道本在线视频| 97精品久久久午夜一区二区三区| 国产成人亚洲精品狼色在线| 久久激五月天综合精品| 精品一区二区三区视频| 国模一区二区三区白浆| 粉嫩13p一区二区三区| 国产高清一区日本| 精品国产一区二区三区久久影院| 欧美mv和日韩mv国产网站| 粉嫩高潮美女一区二区三区| 亚洲国产另类av| 日韩电影在线一区二区三区| 久久国产综合精品| 国产91精品精华液一区二区三区| 91精品国产品国语在线不卡| 九九精品视频在线看| 最新高清无码专区| 美女视频一区在线观看| 国产欧美日韩不卡| 欧美日韩免费高清一区色橹橹| 国内久久精品视频| 一区二区三区鲁丝不卡| 欧美国产精品专区| 5月丁香婷婷综合| 一本一道久久a久久精品综合蜜臀 一本一道综合狠狠老 | 青青草国产成人99久久| 老司机精品视频一区二区三区|