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

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

?? pmc.c

?? nucleas source code
?? 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       */
/*                                                                       */
/*      pmc.c                                          Nucleus PLUS 1.14 */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      PM - Partition Memory Management                                 */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This file contains the core routines for the Partition Memory    */
/*      Management component.                                            */
/*                                                                       */
/* DATA STRUCTURES                                                       */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* FUNCTIONS                                                             */
/*                                                                       */
/*      PMC_Create_Partition_Pool           Create a Partition Pool      */
/*      PMC_Delete_Partition_Pool           Delete a Partition Pool      */
/*      PMC_Allocate_Partition              Allocate a partition from a  */
/*                                            pool                       */
/*      PMC_Deallocate_Partition            Deallocate a partition from  */
/*                                            a pool                     */
/*      PMC_Cleanup                         Cleanup on timeout or a      */
/*                                            terminate condition        */
/*                                                                       */
/* DEPENDENCIES                                                          */
/*                                                                       */
/*      cs_extr.h                           Common Service functions     */
/*      tc_extr.h                           Thread Control functions     */
/*      pm_extr.h                           Partition 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        "pm_extr.h"                 /* Partition functions       */
#include        "hi_extr.h"                 /* History functions         */
#include        "profiler.h"                /* ProView interface         */


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

extern CS_NODE         *PMD_Created_Pools_List;
extern UNSIGNED         PMD_Total_Pools;
extern TC_PROTECT       PMD_List_Protect;


/* Define internal component function prototypes.  */

VOID    PMC_Cleanup(VOID *information);


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      PMC_Create_Partition_Pool                                        */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function creates a memory partition pool and then places it */
/*      on the list of created partition pools.                          */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      PMCE_Create_Partition_Pool          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                                                                */
/*                                                                       */
/*      pool_ptr                            Partition pool control block */
/*                                            pointer                    */
/*      name                                Partition pool name          */
/*      start_address                       Starting address of the pool */
/*      pool_size                           Number of bytes in the pool  */
/*      partition_size                      Number of bytes in each      */
/*                                            partition of the pool      */
/*      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  PMC_Create_Partition_Pool(NU_PARTITION_POOL *pool_ptr, CHAR *name,
                        VOID *start_address, UNSIGNED pool_size,
                        UNSIGNED partition_size, OPTION suspend_type)
{

R1 PM_PCB      *pool;                       /* Pool control block ptr    */
INT             i;                          /* Working index variable    */
BYTE_PTR        pointer;                    /* Working byte pointer      */
PM_HEADER      *header_ptr;                 /* Partition block header ptr*/
NU_SUPERV_USER_VARIABLES

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

    /* Move input pool pointer into internal pointer.  */
    pool =  (PM_PCB *) pool_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_PARTITION_POOL_ID, (UNSIGNED) pool,
                                (UNSIGNED) name, (UNSIGNED) start_address);

#endif

    /* First, clear the partition pool ID just in case it is an old
       pool control block.  */
    pool -> pm_id =             0;

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

    /* Save the starting address and size parameters in the partition control
       block.  */
    pool -> pm_start_address =   start_address;
    pool -> pm_pool_size =       pool_size;
    pool -> pm_partition_size =  partition_size;

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

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

        /* Priority suspension is selected.  */
        pool -> pm_fifo_suspend =  NU_FALSE;

    /* Clear the suspension list pointer.  */
    pool -> pm_suspension_list =  NU_NULL;

    /* Clear the number of tasks waiting on the partition pool.  */
    pool -> pm_tasks_waiting =  0;

    /* Initialize link pointers.  */
    pool -> pm_created.cs_previous =    NU_NULL;
    pool -> pm_created.cs_next =        NU_NULL;

    /* Initialize the partition parameters.  */
    pool -> pm_available =       0;
    pool -> pm_allocated =       0;
    pool -> pm_available_list =  NU_NULL;

    /* Convert the supplied partition size into something that is evenly
       divisible by the sizeof an UNSIGNED data element.  This insures
       UNSIGNED alignment.  */
    partition_size =
        ((partition_size + sizeof(UNSIGNED) - 1)/sizeof(UNSIGNED)) *
                                                        sizeof(UNSIGNED);

    /* Loop to build and link as many partitions as possible from within the
       specified memory area.  */
    pointer =  (BYTE_PTR)  start_address;
    while (pool_size >= (PM_OVERHEAD + partition_size))
    {

        /* There is room for another partition.  */

        /* Cast the current pointer variable to a header pointer.  */
        header_ptr =  (PM_HEADER *) pointer;

        /* Now, build a header and link it into the partition pool
           available list- at the front.  */
        header_ptr -> pm_partition_pool =  pool;
        header_ptr -> pm_next_available =  pool -> pm_available_list;
        pool -> pm_available_list =        header_ptr;

        /* Increment the number of partitions available in the pool.  */
        pool -> pm_available++;

        /* Decrement the number of bytes remaining in the pool.  */
        pool_size =  pool_size - (PM_OVERHEAD + partition_size);

        /* Increment the working pointer to the next partition position.  */
        pointer =  pointer + (PM_OVERHEAD + partition_size);
    }

    /* Protect against access to the list of created partition pools.  */
    TCT_Protect(&PMD_List_Protect);

    /* At this point the partition pool is completely built.  The ID can
       now be set and it can be linked into the created partition pool list. */
    pool -> pm_id =  PM_PARTITION_ID;

    /* Link the partition pool into the list of created partition pools and
       increment the total number of pools in the system.  */
    CSC_Place_On_List(&PMD_Created_Pools_List, &(pool -> pm_created));
    PMD_Total_Pools++;

#ifdef INCLUDE_PROVIEW
    _RTProf_DumpPartitionPool(RT_PROF_CREATE_PARTITION_POOL,pool,RT_PROF_OK);
#endif /* INCLUDE_PROVIEW */
    /* Release protection against access to the list of created partition
       pools.  */
    TCT_Unprotect();

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

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


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      PMC_Delete_Partition_Pool                                        */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function deletes a memory partition pool and removes it from*/
/*      the list of created partition pools.  All tasks suspended on the */
/*      partition pool are resumed with the appropriate error status.    */
/*      Note that this function does not free any memory associated with */
/*      either the pool area or the pool control block.                  */
/*                                                                       */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩美女啊v在线免费观看| 欧美精品久久天天躁| 国产精品理论在线观看| 成人性生交大片免费看中文| 中文字幕一区二区三区在线播放| 99国产精品久| 日韩综合一区二区| 久久久久久99精品| 色视频一区二区| 日韩一区欧美二区| 国产亚洲精久久久久久| 97精品国产97久久久久久久久久久久| 亚洲一区在线观看免费 | 国产成人午夜高潮毛片| 国产精品久线在线观看| 欧美性受xxxx黑人xyx| 麻豆91免费观看| ㊣最新国产の精品bt伙计久久| 在线中文字幕一区| 久久国产麻豆精品| 亚洲欧美偷拍另类a∨色屁股| 在线播放中文字幕一区| 国产成人午夜片在线观看高清观看| 亚洲精选在线视频| 亚洲精品在线电影| 91麻豆国产在线观看| 男男视频亚洲欧美| 亚洲精品高清在线| 久久久噜噜噜久久人人看| 欧美专区亚洲专区| 国产精品亚洲а∨天堂免在线| 亚洲乱码国产乱码精品精的特点| 日韩精品中午字幕| 色屁屁一区二区| 国产成人一级电影| 蜜臀久久久久久久| 一区二区三区中文字幕精品精品| 日韩影院在线观看| 亚洲图片欧美色图| 精品对白一区国产伦| 色欧美片视频在线观看在线视频| 久久精品国产99国产精品| 成人午夜激情视频| 亚洲美女免费在线| 99精品视频在线免费观看| 精品国产亚洲一区二区三区在线观看| 亚洲欧洲中文日韩久久av乱码| 久久精品国产免费| 欧美精品久久一区二区三区| 欧美激情综合在线| 亚洲图片自拍偷拍| 欧美视频一区二区在线观看| 五月激情综合网| 久久综合九色综合97婷婷 | 欧美性生活影院| 亚洲精品久久久久久国产精华液| 精品视频一区二区三区免费| 亚洲国产日韩综合久久精品| 欧美另类z0zxhd电影| 天堂蜜桃一区二区三区| 欧美变态tickle挠乳网站| 国产精品一线二线三线精华| 18欧美亚洲精品| 欧美一区二区成人6969| 国产呦萝稀缺另类资源| 一区二区三区日韩| 亚洲欧洲国产专区| 蜜臀精品一区二区三区在线观看| 这里只有精品免费| 成人永久免费视频| 亚洲色图视频网站| 亚洲精品在线电影| 美国一区二区三区在线播放| 色婷婷av一区二区三区软件 | 国产激情精品久久久第一区二区 | 亚洲视频图片小说| 国产欧美一区二区精品仙草咪 | 国产亚洲精品免费| 久久精品视频网| 日本一区二区三区高清不卡| 中文字幕欧美激情一区| 国产日韩综合av| 国产精品嫩草久久久久| 国产精品福利av| 亚洲免费在线视频一区 二区| 综合自拍亚洲综合图不卡区| 国产精品久久久久久久第一福利| 国产精品美女久久久久高潮| 国产精品国产精品国产专区不片| 1区2区3区精品视频| 亚洲综合图片区| 天天av天天翘天天综合网色鬼国产 | 日韩**一区毛片| 美女网站在线免费欧美精品| 国产一区二区三区美女| 成人夜色视频网站在线观看| 在线看日本不卡| 91精品午夜视频| 国产午夜精品久久久久久久| 国产精品久久久久久久久果冻传媒 | 天堂影院一区二区| 美女诱惑一区二区| 丁香一区二区三区| 91蜜桃婷婷狠狠久久综合9色| 日本欧美一区二区三区| 91精品国产91久久久久久一区二区| 欧美手机在线视频| 精品久久一区二区三区| 自拍偷自拍亚洲精品播放| 亚洲一区二区中文在线| 国产在线播放一区| 91毛片在线观看| 欧美不卡一二三| 亚洲免费伊人电影| 激情av综合网| 91福利视频在线| 久久综合中文字幕| 一区二区三区在线免费视频| 久久 天天综合| 色综合中文字幕国产 | 国产乱对白刺激视频不卡| 欧美性猛交xxxx乱大交退制版| 欧美一个色资源| 中文字幕在线观看不卡视频| 日韩av中文字幕一区二区| 成人免费视频免费观看| 91精品啪在线观看国产60岁| 国产精品萝li| 韩国在线一区二区| 欧美日韩一区二区在线观看| 中文字幕乱码亚洲精品一区| 秋霞电影网一区二区| 色狠狠综合天天综合综合| 欧美精品一区二| 日韩精品欧美成人高清一区二区| 99久久久久久| 久久精品夜夜夜夜久久| 日韩高清电影一区| 日本道精品一区二区三区| 国产日韩欧美激情| 美女脱光内衣内裤视频久久网站| 色丁香久综合在线久综合在线观看| 久久久久久久久久久黄色| 欧美aaaaaa午夜精品| 欧美日韩国产免费一区二区 | 日韩女优av电影在线观看| 亚洲精品乱码久久久久久| 成人激情开心网| 国产亚洲精品福利| 九九精品一区二区| 欧美一二三区在线观看| 亚洲动漫第一页| 欧美性受极品xxxx喷水| 一区二区三区精品| 91视频一区二区三区| 国产精品久久久久桃色tv| 国产精品一区免费在线观看| 久久中文字幕电影| 久久国产成人午夜av影院| 欧美一区二区日韩一区二区| 亚洲成人黄色小说| 91.com在线观看| 日韩精品一卡二卡三卡四卡无卡| 欧美视频三区在线播放| 亚洲一区二区三区精品在线| 在线观看免费亚洲| 亚洲成年人影院| 678五月天丁香亚洲综合网| 青青草视频一区| 欧美成人一区二区三区在线观看| 日本午夜精品视频在线观看| 日韩精品中文字幕一区| 久久成人精品无人区| 精品国产制服丝袜高跟| 国产激情偷乱视频一区二区三区| 日本一区二区三区四区| 99v久久综合狠狠综合久久| 亚洲精选一二三| 欧美日韩成人一区| 久久精品国产成人一区二区三区| 精品国产伦一区二区三区免费| 极品少妇一区二区三区精品视频 | 91精品麻豆日日躁夜夜躁| 日韩国产一区二| 精品1区2区在线观看| 成人黄页在线观看| 亚洲一区免费观看| 日韩欧美在线123| 国产成人一区二区精品非洲| 亚洲日本在线天堂| 欧美日韩1区2区| 国产一区二区中文字幕| 综合久久久久久| 欧美精品在欧美一区二区少妇| 久久99精品国产麻豆不卡| 国产精品麻豆一区二区| 欧美色图一区二区三区| 极品美女销魂一区二区三区免费| 国产欧美日韩亚州综合| 91久久精品网|