亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
偷拍亚洲欧洲综合| 久久一二三国产| 黄一区二区三区| 亚洲国产精品嫩草影院| 亚洲成人资源在线| 日韩一区精品视频| 久久99国产精品免费网站| 九九视频精品免费| 国产精品一区在线观看乱码| 国产成人亚洲综合a∨猫咪| 国产成人免费在线| a4yy欧美一区二区三区| 色噜噜狠狠成人网p站| 在线视频国内自拍亚洲视频| 欧日韩精品视频| 制服丝袜成人动漫| 久久网这里都是精品| 最新中文字幕一区二区三区| 一区二区三区精密机械公司| 日韩黄色免费网站| 国产福利一区二区三区视频在线| 久久国产精品99精品国产| 日韩国产精品久久| 国产精品 欧美精品| www.视频一区| 欧美日韩大陆在线| 久久精品在线免费观看| 亚洲嫩草精品久久| 蜜臀av性久久久久蜜臀aⅴ四虎 | 免费精品视频最新在线| 国产一区 二区| 色综合久久久久久久久久久| 日韩欧美黄色影院| 亚洲色图丝袜美腿| 久久99国产精品免费| 91麻豆免费在线观看| 亚洲123区在线观看| 国产精品正在播放| 欧美午夜一区二区| 国产欧美日产一区| 天天色天天爱天天射综合| 国产成人99久久亚洲综合精品| 欧美专区在线观看一区| 国产婷婷色一区二区三区四区| 夜夜爽夜夜爽精品视频| 国产一区二区电影| 777奇米四色成人影色区| 国产精品美女久久久久av爽李琼| 日日噜噜夜夜狠狠视频欧美人| av成人免费在线| 久久综合网色—综合色88| 天天操天天综合网| 色偷偷久久一区二区三区| 久久精品亚洲精品国产欧美| 日韩av一区二区三区| 色综合久久中文综合久久97 | 国产女主播在线一区二区| 亚洲国产精品一区二区久久恐怖片 | 99久久久精品| 久久久久久麻豆| 激情五月婷婷综合网| 欧美色视频在线| 亚洲欧美怡红院| 成人综合在线网站| 国产亚洲成av人在线观看导航| 奇米综合一区二区三区精品视频| 欧美视频在线观看一区二区| 亚洲精品日韩一| hitomi一区二区三区精品| 久久久青草青青国产亚洲免观| 毛片av一区二区三区| 欧美日韩亚洲不卡| 天天操天天干天天综合网| 欧洲亚洲精品在线| 一区二区三区久久| 99久久婷婷国产精品综合| 国产精品视频第一区| 成人av动漫在线| 亚洲天堂网中文字| 色综合久久中文字幕| 亚洲精品成人在线| 欧美三电影在线| 男女视频一区二区| 精品精品欲导航| 国产一区二区三区国产| 国产欧美日韩三区| 色综合亚洲欧洲| 亚洲成人av在线电影| 91精品国产综合久久久蜜臀粉嫩 | 国产激情精品久久久第一区二区| 久久久精品免费免费| 成人激情校园春色| 亚洲摸摸操操av| 欧美精品色一区二区三区| 日本欧美久久久久免费播放网| 精品国一区二区三区| 波多野结衣一区二区三区| 伊人色综合久久天天| 欧美另类videos死尸| 精品一二三四区| 国产精品福利影院| 欧美日韩1234| 国产69精品久久久久毛片| 亚洲欧美日韩中文播放 | 舔着乳尖日韩一区| 久久久综合激的五月天| 成人黄色av电影| 亚洲va韩国va欧美va| 欧美电影免费观看高清完整版在线 | 亚洲一区二区三区在线| 日韩一区二区不卡| 成人高清在线视频| 秋霞电影网一区二区| 国产精品久久久久久久久免费樱桃| 欧美亚洲动漫制服丝袜| 韩国精品久久久| 亚洲国产欧美一区二区三区丁香婷| 日韩三级电影网址| 在线观看av一区| 成人一区二区三区中文字幕| 亚洲成a人v欧美综合天堂| 中文字幕精品一区二区三区精品| 精品视频在线免费看| 国产老肥熟一区二区三区| 一区二区高清免费观看影视大全 | 国产成人免费xxxxxxxx| 亚洲va韩国va欧美va| 亚洲天堂成人网| 久久综合成人精品亚洲另类欧美| 欧美婷婷六月丁香综合色| 成人av免费在线观看| 国产乱码精品一区二区三区忘忧草 | 欧美成人bangbros| 欧美日韩久久一区| 91香蕉视频污| 粉嫩久久99精品久久久久久夜| 日本亚洲电影天堂| 亚洲3atv精品一区二区三区| 亚洲色图20p| 亚洲色图一区二区| 成人免费在线视频| 国产精品无遮挡| 久久精品视频免费观看| 精品国产乱码久久久久久浪潮| 欧美高清性hdvideosex| 欧美在线综合视频| 欧美在线不卡一区| 日本韩国一区二区三区| 99精品视频在线播放观看| 国产伦精品一区二区三区视频青涩 | 日韩西西人体444www| 欧美色欧美亚洲另类二区| 在线观看av一区二区| 欧美色图在线观看| 欧美精品亚洲二区| 日韩欧美三级在线| 久久久精品日韩欧美| 欧美激情一区在线观看| 国产精品伦理一区二区| 国产精品高潮呻吟| 一区二区三区日韩| 日韩一区精品字幕| 激情图片小说一区| 国产99久久久国产精品| 91麻豆视频网站| 欧美日韩色一区| 精品国产亚洲在线| 欧美国产视频在线| 一区二区三区四区视频精品免费| 亚洲一区二区三区四区的| 调教+趴+乳夹+国产+精品| 免费看黄色91| 成人av在线资源网站| 色哟哟亚洲精品| 欧美一级搡bbbb搡bbbb| 久久久久久黄色| 亚洲黄色免费电影| 免费观看30秒视频久久| 国产成人超碰人人澡人人澡| 91成人看片片| 欧美v日韩v国产v| 国产精品美女久久久久高潮| 亚洲国产精品久久一线不卡| 亚洲精品一区二区在线观看| 99九九99九九九视频精品| 国产不卡免费视频| 91精品一区二区三区在线观看| 亚洲线精品一区二区三区八戒| 国产精品情趣视频| 婷婷国产在线综合| 成人一级片网址| 欧美日韩五月天| 国产精品久久久久久久久动漫 | 欧美军同video69gay| 久久综合色之久久综合| 亚洲乱码精品一二三四区日韩在线| 免费观看久久久4p| 在线视频国内自拍亚洲视频| 精品国产电影一区二区| 午夜精品影院在线观看|