亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产成人日日夜夜| 国产精品自在在线| 色嗨嗨av一区二区三区| 欧美久久久久久久久| 中文字幕一区二区三区不卡| 蜜桃久久av一区| 欧美午夜视频网站| 亚洲欧美日本韩国| 国产伦精品一区二区三区在线观看 | 国产精品不卡视频| 99久久99久久精品国产片果冻| 国产偷v国产偷v亚洲高清| 激情av综合网| 欧美激情中文不卡| 99国产精品一区| 亚洲国产高清在线观看视频| 国产精品1区2区| 中文一区在线播放| 一本到不卡免费一区二区| 亚洲天堂a在线| 欧美日韩中文字幕一区二区| 粉嫩在线一区二区三区视频| 欧美激情一区二区三区蜜桃视频| 成人性视频免费网站| 国产欧美日产一区| 一本大道av伊人久久综合| 亚瑟在线精品视频| 欧美一级国产精品| 国产福利精品导航| 欧美激情艳妇裸体舞| 99久免费精品视频在线观看| 亚洲一本大道在线| 久久蜜臀精品av| 久久亚洲捆绑美女| gogogo免费视频观看亚洲一| 亚洲一区二区黄色| 国产精品免费久久| 99精品1区2区| 激情六月婷婷综合| 亚洲一区二区三区激情| 久久影音资源网| 欧美日韩精品一区二区三区四区 | 欧美国产精品v| 在线看国产一区二区| 精品一区二区三区影院在线午夜| 日本一区二区视频在线| 51久久夜色精品国产麻豆| 国产成人精品免费在线| 五月天激情综合网| 中文字幕在线播放不卡一区| 日韩精品影音先锋| 欧美精品xxxxbbbb| 欧美日韩国产综合一区二区| av不卡一区二区三区| 成人av网址在线| 青娱乐精品视频| 日本va欧美va精品发布| 亚洲一区二区三区爽爽爽爽爽| 国产精品成人免费| 欧美国产日产图区| 欧美一二三区在线观看| 7777女厕盗摄久久久| 欧美日韩免费在线视频| 经典三级视频一区| 午夜国产精品影院在线观看| 玉米视频成人免费看| 亚洲一区二区三区视频在线| 一区二区三区在线免费| 亚洲一二三区不卡| 秋霞av亚洲一区二区三| 亚洲自拍偷拍网站| 久久av中文字幕片| 国产亚洲成av人在线观看导航| 欧美亚州韩日在线看免费版国语版 | 午夜国产精品影院在线观看| 久久精品国产精品亚洲精品 | 国产精品国产自产拍高清av | 国产精品天天看| 国产精品私房写真福利视频| 欧美一区二区精品在线| 在线不卡的av| 精品国产乱码久久| 欧美放荡的少妇| 26uuu久久综合| 亚洲激情自拍视频| 性做久久久久久久免费看| 亚洲午夜一二三区视频| 免费观看成人av| 一区二区日韩电影| 亚洲高清在线精品| 青青草伊人久久| 日本sm残虐另类| 成人网页在线观看| 亚洲高清视频中文字幕| 麻豆精品精品国产自在97香蕉| 午夜精品福利一区二区三区av | 精品国产一区二区精华| 欧美成人精品高清在线播放| 26uuu国产一区二区三区| 国产精品久久二区二区| 亚洲一卡二卡三卡四卡无卡久久| 六月婷婷色综合| 暴力调教一区二区三区| **欧美大码日韩| 久草中文综合在线| 午夜精彩视频在线观看不卡| 日韩av不卡在线观看| 蜜桃视频在线观看一区| 99国产精品国产精品久久| 日韩欧美卡一卡二| 亚洲一区二区黄色| 成人黄色大片在线观看| 日韩精品一区二区在线| 精品国产乱码久久久久久牛牛| 久久国产精品第一页| 久久众筹精品私拍模特| 波多野结衣欧美| 日韩av高清在线观看| 久久影院午夜论| 欧美色图天堂网| 国产一区二区按摩在线观看| 亚洲激情五月婷婷| 欧美精品一区二区精品网| eeuss鲁片一区二区三区 | 午夜国产精品一区| 精品国产免费一区二区三区香蕉| 99精品视频在线观看免费| 亚洲一区二区高清| 亚洲日本va在线观看| 欧美成人精品3d动漫h| 欧美午夜精品免费| 91免费国产视频网站| 国产成人在线视频播放| 麻豆91精品91久久久的内涵| 一二三四区精品视频| 中文成人av在线| 欧美激情综合五月色丁香 | 欧美一区永久视频免费观看| 9久草视频在线视频精品| 成人永久免费视频| 国产精品夜夜嗨| 国产精品456| 丁香天五香天堂综合| 久久99精品久久久久久动态图| 亚洲精品欧美专区| 亚洲中国最大av网站| 亚洲日本乱码在线观看| 亚洲女爱视频在线| 午夜影院久久久| 蜜桃av一区二区在线观看| 日本欧美韩国一区三区| 蜜臀精品久久久久久蜜臀 | 欧美久久久一区| 26uuu精品一区二区在线观看| 精品成人私密视频| 欧美成人免费网站| 中文字幕国产一区二区| 国产精品卡一卡二卡三| 亚洲国产wwwccc36天堂| 日本在线不卡一区| 国产乱码精品一区二区三区av| 成人免费毛片片v| 欧美猛男gaygay网站| 欧美成人一区二区| 国产精品你懂的在线欣赏| 亚洲婷婷综合色高清在线| 青青青伊人色综合久久| 国产iv一区二区三区| 欧美中文字幕一二三区视频| 亚洲精品一区二区在线观看| 国产精品狼人久久影院观看方式| 亚洲国产成人av| 成人黄色片在线观看| 91精品蜜臀在线一区尤物| 中国色在线观看另类| 狂野欧美性猛交blacked| av欧美精品.com| 国产日产精品一区| 免费精品视频在线| 欧美日韩精品一区视频| 亚洲欧美综合色| 国产精品一级黄| xfplay精品久久| 久久不见久久见中文字幕免费| 色婷婷综合五月| 亚洲欧洲日本在线| 国产成人精品亚洲777人妖| 欧美精品一区二区高清在线观看| 奇米影视7777精品一区二区| 欧美最猛性xxxxx直播| 亚洲精品乱码久久久久| 99天天综合性| 亚洲欧美日韩一区| 91小视频在线观看| 国产精品白丝在线| 99久久婷婷国产综合精品| 1024精品合集| 欧美精品亚洲二区| 国模大尺度一区二区三区| 久久久国产精品麻豆|