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

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

?? pmc.c

?? NucleusPLUS嵌入式操作系統是目前最受歡迎的操作系統NucleusPLUS是為實時嵌入式應用而設計的一個搶先式多任務操作系統內核
?? 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一区二区三区免费野_久草精品视频
欧美大片国产精品| 欧美性欧美巨大黑白大战| 日韩影院精彩在线| 亚洲成人av一区二区| 亚洲久草在线视频| 亚洲欧美日韩国产中文在线| 国产精品久久久久久久久快鸭 | 亚洲在线视频免费观看| 亚洲精品乱码久久久久久久久| 中文字幕日韩一区| 亚洲精品乱码久久久久久| 亚洲精品成人在线| 视频在线观看国产精品| 老司机一区二区| 国产91色综合久久免费分享| 成人免费视频一区| 91老司机福利 在线| 91福利在线导航| 91精品国产色综合久久不卡蜜臀| 欧美一区二区久久| 国产视频一区二区三区在线观看| 欧美国产激情二区三区| 一区二区三区蜜桃网| 日本va欧美va欧美va精品| 国产乱对白刺激视频不卡| aaa亚洲精品一二三区| 欧美色老头old∨ideo| 日韩欧美一区在线| 国产精品久久久久婷婷二区次| 一区二区三区国产| 国产精品自在在线| 欧美性猛交一区二区三区精品 | 日韩欧美国产高清| 欧美国产1区2区| 婷婷一区二区三区| 国产精品一线二线三线| 欧美伊人久久久久久午夜久久久久| 91精品国产综合久久久久久久 | 一区二区三区在线视频观看58| 视频一区二区不卡| 成人高清免费观看| 欧美一区二区三区四区久久 | 99这里都是精品| 欧美剧情电影在线观看完整版免费励志电影| 日韩一区二区在线观看| 中文字幕一区二区在线观看 | 国内不卡的二区三区中文字幕| 91视频一区二区三区| 欧美精品一区二区久久久| 亚洲一二三专区| 丁香亚洲综合激情啪啪综合| 欧美美女直播网站| 日韩毛片视频在线看| 国产一区二区三区久久悠悠色av| 在线视频国内自拍亚洲视频| 国产欧美一区二区精品婷婷| 日韩国产欧美在线观看| 欧美亚日韩国产aⅴ精品中极品| 久久久久久电影| 久久福利资源站| 91精品国产麻豆| 亚洲妇女屁股眼交7| 91蜜桃免费观看视频| 国产精品乱码一区二三区小蝌蚪| 另类中文字幕网| 9191成人精品久久| 亚洲成人一区在线| 在线精品视频免费观看| 亚洲欧美国产高清| 日本高清不卡一区| 亚洲人成影院在线观看| www.成人网.com| 国产精品毛片久久久久久| 成人影视亚洲图片在线| 久久久一区二区| 国产久卡久卡久卡久卡视频精品| 精品国产1区2区3区| 精品在线视频一区| 日韩视频一区二区| 国内精品视频一区二区三区八戒| 欧美r级在线观看| 麻豆成人综合网| 精品久久久久久综合日本欧美| 久久精品噜噜噜成人av农村| 日韩精品最新网址| 国产精品538一区二区在线| 久久久久国产精品麻豆ai换脸| 国产一区二区精品久久91| 久久精品视频免费| gogogo免费视频观看亚洲一| 一区在线观看视频| 日本道免费精品一区二区三区| 亚洲激情一二三区| 国产精品日日摸夜夜摸av| heyzo一本久久综合| 亚洲午夜在线观看视频在线| 欧美肥妇bbw| 精品一区二区在线看| 亚洲国产精品成人综合色在线婷婷| caoporn国产一区二区| 亚洲综合图片区| 精品久久久久久无| av动漫一区二区| 一区二区成人在线| 日韩欧美三级在线| 成人av第一页| 日韩激情av在线| 久久久高清一区二区三区| 91亚洲精品久久久蜜桃| 日韩二区三区四区| 日本一区二区免费在线观看视频| 一本一本久久a久久精品综合麻豆| 亚洲h在线观看| 2024国产精品视频| 在线欧美日韩国产| 精品在线一区二区三区| 亚洲乱码一区二区三区在线观看| 7777女厕盗摄久久久| 成人免费福利片| 婷婷六月综合网| 国产欧美日韩三区| 欧美一二区视频| 一本大道av一区二区在线播放| 全国精品久久少妇| 亚洲国产美女搞黄色| 欧美韩日一区二区三区| 日韩欧美中文一区二区| 欧美中文字幕亚洲一区二区va在线 | av一二三不卡影片| 亚洲精品免费视频| 国产日韩av一区| 欧美一区二区在线观看| 在线观看精品一区| 99久久伊人网影院| 激情综合亚洲精品| 蜜桃视频第一区免费观看| 亚洲女子a中天字幕| 欧美激情一二三区| 国产午夜一区二区三区| 欧美一二三在线| 51精品国自产在线| 欧美美女bb生活片| 欧美撒尿777hd撒尿| 色婷婷亚洲综合| eeuss鲁片一区二区三区在线观看| 国产原创一区二区| 精品无人区卡一卡二卡三乱码免费卡 | 国产一区二区三区综合| 天堂成人国产精品一区| 一卡二卡三卡日韩欧美| 国产精品三级视频| 精品少妇一区二区三区日产乱码| 欧美日本不卡视频| 欧美优质美女网站| 欧美视频第二页| 欧美日韩精品一区二区天天拍小说| 色综合 综合色| 欧美在线视频你懂得| 91官网在线观看| 欧美日韩国产影片| 欧美一区二区成人6969| 欧美一级久久久| 久久这里只有精品首页| 精品日韩一区二区三区免费视频| 日韩欧美一级在线播放| 亚洲精品在线观| 欧美激情在线一区二区三区| 国产精品国产自产拍高清av| 综合亚洲深深色噜噜狠狠网站| 一区二区三区资源| 天堂蜜桃91精品| 经典一区二区三区| 豆国产96在线|亚洲| 色狠狠色狠狠综合| 欧美精品1区2区3区| 精品久久一区二区| 国产精品国产三级国产aⅴ入口 | 亚洲国产裸拍裸体视频在线观看乱了| 亚洲国产精品久久不卡毛片| 蜜桃91丨九色丨蝌蚪91桃色| 黄一区二区三区| 91在线国产福利| 欧美一区二区三区视频| 国产欧美日韩综合| 午夜精品福利久久久| 国产在线精品免费| 一本高清dvd不卡在线观看| 欧美肥妇bbw| 欧美国产精品v| 午夜精品在线看| 国产乱码一区二区三区| 91国偷自产一区二区三区观看| 日韩欧美中文字幕精品| 亚洲天堂精品在线观看| 久久福利资源站| 色成年激情久久综合| 久久免费美女视频| 亚洲国产精品尤物yw在线观看| 国产一区二区日韩精品| 欧美性生活久久|