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

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

?? pmc.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       */
/*                                                                       */
/*      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一区二区| 久久精品国产**网站演员| 日韩午夜在线播放| 狠狠色丁香婷综合久久| 久久婷婷综合激情| 99久久精品国产精品久久| 亚洲乱码国产乱码精品精的特点| 91丝袜国产在线播放| 亚洲成人第一页| 精品国产一区二区三区久久影院| 国产精品中文字幕欧美| 亚洲欧美另类小说| 在线观看91av| 国产精品一区一区三区| 自拍偷拍欧美激情| 欧美一级xxx| 国产成人免费在线观看不卡| 一区二区在线免费观看| 4438x成人网最大色成网站| 国产精品自拍一区| 一区二区在线观看免费| 欧美一区二区三区不卡| 成+人+亚洲+综合天堂| 午夜成人免费电影| 国产女人水真多18毛片18精品视频| 成人激情校园春色| 日日夜夜精品视频天天综合网| 久久久精品日韩欧美| 欧美中文字幕一区二区三区 | 国产精品污www在线观看| 91久久国产综合久久| 激情综合亚洲精品| 一区二区三区四区在线播放| 精品国产123| 欧美探花视频资源| 国产成人免费视| 日产欧产美韩系列久久99| 国产精品久线在线观看| 日韩精品一区国产麻豆| 在线观看视频一区| 成人午夜精品一区二区三区| 奇米一区二区三区av| 亚洲一级在线观看| 国产精品视频yy9299一区| 日韩欧美在线影院| 欧美亚洲日本国产| 91丝袜美女网| 国产白丝精品91爽爽久久| 青娱乐精品在线视频| 亚洲免费观看高清| 国产精品久久午夜夜伦鲁鲁| 精品少妇一区二区三区| 欧美二区三区91| 色哦色哦哦色天天综合| 成人黄色网址在线观看| 国产一区91精品张津瑜| 久久av中文字幕片| 偷拍自拍另类欧美| 亚洲成人免费视频| 亚洲国产精品一区二区尤物区| 中文字幕 久热精品 视频在线 | 午夜视频在线观看一区| 亚洲天天做日日做天天谢日日欢| www激情久久| 2021久久国产精品不只是精品| 777久久久精品| 欧美精品久久99久久在免费线| 91黄色免费网站| k8久久久一区二区三区 | 在线观看亚洲精品| 91欧美一区二区| 99久久精品免费| 91视频免费观看| 欧美一a一片一级一片| 91福利在线看| 欧美男女性生活在线直播观看| 欧美性高清videossexo| 欧美日韩国产精品成人| 欧美性欧美巨大黑白大战| 欧美视频三区在线播放| 欧美日韩一区精品| 欧美精品一二三| 精品精品国产高清一毛片一天堂| 欧美xxx久久| 久久久综合视频| 国产精品蜜臀av| **网站欧美大片在线观看| 亚洲色图欧洲色图婷婷| 亚洲成人午夜电影| 看片的网站亚洲| 国产精品亚洲第一区在线暖暖韩国| 国产精品一级黄| 99久久婷婷国产| 欧美亚洲一区二区在线| 日韩一级视频免费观看在线| 久久亚洲一区二区三区明星换脸 | 国产亚洲va综合人人澡精品 | 亚洲视频一区二区在线观看| 一区二区三区鲁丝不卡| 丝袜脚交一区二区| 国产一区二区按摩在线观看| 97久久人人超碰| 日韩一区国产二区欧美三区| 久久九九国产精品| 亚洲美女视频在线| 蜜臂av日日欢夜夜爽一区| 国产成a人亚洲精| 欧美撒尿777hd撒尿| 精品999久久久| 亚洲精品国产a| 麻豆国产精品一区二区三区| 成人蜜臀av电影| 欧美日韩亚洲高清一区二区| 久久影院午夜论| 亚洲一区二区三区四区在线 | 亚洲一区二区三区四区在线 | ...中文天堂在线一区| 日本伊人午夜精品| 成人高清av在线| 欧美夫妻性生活| 中文字幕av在线一区二区三区| 天天综合网 天天综合色| 国产成人综合亚洲91猫咪| 欧美午夜视频网站| 日本一区二区三区dvd视频在线| 午夜私人影院久久久久| 波多野结衣91| 精品日韩在线一区| 亚洲一区二区三区不卡国产欧美| 国产一区二区三区四区五区美女 | 亚洲激情校园春色| 国产精品正在播放| 欧美一级一区二区| 一卡二卡三卡日韩欧美| 成人的网站免费观看| 日韩美女一区二区三区| 亚洲国产毛片aaaaa无费看| 成人免费精品视频| 久久人人超碰精品| 免费成人美女在线观看.| 欧美亚男人的天堂| 亚洲丝袜另类动漫二区| 国产a精品视频| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 精品污污网站免费看| 国产精品国产三级国产| 国产老妇另类xxxxx| 欧美成人一区二区三区| 日本欧美肥老太交大片| 欧美高清www午色夜在线视频| 亚洲免费在线观看视频| 99麻豆久久久国产精品免费| 国产色综合久久| 国产激情一区二区三区| 欧美va亚洲va国产综合| 开心九九激情九九欧美日韩精美视频电影 | 日韩欧美一区二区久久婷婷| 亚洲亚洲人成综合网络| 欧美在线不卡一区| 一区二区三区免费| 一本色道**综合亚洲精品蜜桃冫 | 欧美私人免费视频| 亚洲第一久久影院| 欧美色中文字幕| 日韩精品乱码av一区二区| 欧美一区二区日韩一区二区| 免费亚洲电影在线| 日韩精品一区二区三区视频 | 一区二区三区产品免费精品久久75| 成人精品视频一区二区三区尤物| 欧美高清在线视频| av不卡在线播放| 亚洲一级不卡视频| 欧美精品第1页| 精品一区二区三区免费视频| 久久蜜桃av一区精品变态类天堂 | 国产精品美女久久久久久久久| 成人性生交大片免费看视频在线| 国产精品麻豆欧美日韩ww| 波多野结衣中文一区| 亚洲黄色性网站| 欧美日韩一区 二区 三区 久久精品| 午夜视频在线观看一区二区三区| 7777女厕盗摄久久久| 韩国理伦片一区二区三区在线播放| 久久综合色8888| 91蜜桃婷婷狠狠久久综合9色| 亚洲一区二区不卡免费| 日韩精品中文字幕在线一区| 大胆欧美人体老妇| 亚洲综合色区另类av| 欧美成人三级电影在线| 懂色av一区二区三区蜜臀| 亚洲四区在线观看| 91精品国产91热久久久做人人| 国产乱国产乱300精品| 亚洲精品视频在线看| 日韩视频在线永久播放| 国产不卡视频在线观看|