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

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

?? dmc.c

?? 基于OMAP1510的Nucleus移植代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*************************************************************************/
/*                                                                       */
/*               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       */
/*                                                                       */
/*      dmc.c                                          Nucleus PLUS 1.14 */
/*                                                                       */
/* COMPONENT                                                             */
/*                                                                       */
/*      DM - Dynamic Memory Management                                   */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This file contains the core routines for the Dynamic Memory      */
/*      Management component.                                            */
/*                                                                       */
/* DATA STRUCTURES                                                       */
/*                                                                       */
/*      None                                                             */
/*                                                                       */
/* FUNCTIONS                                                             */
/*                                                                       */
/*      DMC_Create_Memory_Pool              Create a dynamic memory pool */
/*      DMC_Delete_Memory_Pool              Delete a dynamic memory pool */
/*      DMC_Allocate_Memory                 Allocate a memory block from */
/*                                            a dynamic memory pool      */
/*      DMC_Deallocate_Memory               Deallocate a memory block    */
/*                                            from a dynamic memory pool */
/*      DMC_Cleanup                         Cleanup on timeout or a      */
/*                                            terminate condition        */
/*                                                                       */
/* DEPENDENCIES                                                          */
/*                                                                       */
/*      cs_extr.h                           Common Service functions     */
/*      tc_extr.h                           Thread Control functions     */
/*      dm_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        "dm_extr.h"                 /* Dynamic memory functions  */
#include        "hi_extr.h"                 /* History functions         */
#include        "profiler.h"                /* ProView interface         */


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

extern CS_NODE         *DMD_Created_Pools_List;
extern UNSIGNED         DMD_Total_Pools;
extern TC_PROTECT       DMD_List_Protect;


/* Define internal component function prototypes.  */

VOID    DMC_Cleanup(VOID *information);


/*************************************************************************/
/*                                                                       */
/* FUNCTION                                                              */
/*                                                                       */
/*      DMC_Create_Memory_Pool                                           */
/*                                                                       */
/* DESCRIPTION                                                           */
/*                                                                       */
/*      This function creates a dynamic memory pool and then places it   */
/*      on the list of created dynamic memory pools.                     */
/*                                                                       */
/* CALLED BY                                                             */
/*                                                                       */
/*      Application                                                      */
/*      DMCE_Create_Memory_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                            Memory pool control block    */
/*                                            pointer                    */
/*      name                                Memory pool name             */
/*      start_address                       Starting address of the pool */
/*      pool_size                           Number of bytes in the pool  */
/*      min_allocation                      Minimum allocation size      */
/*      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  DMC_Create_Memory_Pool(NU_MEMORY_POOL *pool_ptr, CHAR *name,
                        VOID *start_address, UNSIGNED pool_size,
                        UNSIGNED min_allocation, OPTION suspend_type)
{

R1 DM_PCB      *pool;                       /* Pool control block ptr    */
INT             i;                          /* Working index variable    */
DM_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 =  (DM_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_MEMORY_POOL_ID, (UNSIGNED) pool,
                        (UNSIGNED) start_address, (UNSIGNED) pool_size);

#endif

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

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

    /* Convert the pool's size into something that is evenly divisible by
       the sizeof an UNSIGNED data element.  */
    pool_size =  (pool_size/sizeof(UNSIGNED)) * sizeof(UNSIGNED);

    /* Save the starting address and size parameters in the dynamic memory
       control block.  */
    pool -> dm_start_address =   start_address;
    pool -> dm_pool_size =       pool_size;
    pool -> dm_min_allocation =
                ((min_allocation + sizeof(UNSIGNED) - 1)/sizeof(UNSIGNED)) *
                                                              sizeof(UNSIGNED);

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

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

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

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

    /* Clear the number of tasks waiting on the dynamic memory pool.  */
    pool -> dm_tasks_waiting =  0;

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

    /* Build a single block that has all of the memory.  */
    header_ptr =  (DM_HEADER *) start_address;

    /* Initialize the memory parameters.  */
    pool -> dm_available =       pool_size - (2 * DM_OVERHEAD);
    pool -> dm_memory_list =     header_ptr;
    pool -> dm_search_ptr =      header_ptr;

    /* Build the block header.  */
    header_ptr -> dm_memory_pool =  pool;
    header_ptr -> dm_memory_free =  NU_TRUE;
    header_ptr -> dm_next_memory =  (DM_HEADER *)
           (((BYTE_PTR) header_ptr) + pool -> dm_available + DM_OVERHEAD);
    header_ptr -> dm_previous_memory =  header_ptr -> dm_next_memory;

    /* Build the small trailer block that prevents block merging when the
       pool wraps around.  Note that the list is circular so searching can
       wrap across the physical end of the memory pool.  */
    header_ptr =  header_ptr -> dm_next_memory;
    header_ptr -> dm_next_memory =  (DM_HEADER *) start_address;
    header_ptr -> dm_previous_memory =  (DM_HEADER *) start_address;
    header_ptr -> dm_memory_pool =  pool;
    header_ptr -> dm_memory_free =  NU_FALSE;

    /* Initialize the protection structure.  */
    pool -> dm_protect.tc_tcb_pointer =  NU_NULL;

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

    /* At this point the dynamic memory pool is completely built.  The ID can
       now be set and it can be linked into the created dynamic memory
       pool list. */
    pool -> dm_id =  DM_DYNAMIC_ID;

    /* Link the memory pool into the list of created memory pools and
       increment the total number of pools in the system.  */
    CSC_Place_On_List(&DMD_Created_Pools_List, &(pool -> dm_created));
    DMD_Total_Pools++;

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

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

    /* Return successful completion.  */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久草精品在线观看| 欧美亚洲自拍偷拍| 国产美女视频一区| 国模大尺度一区二区三区| 另类欧美日韩国产在线| 男女激情视频一区| 久久99精品视频| 国产一区二区精品久久| 国产盗摄一区二区| 粉嫩av一区二区三区在线播放| 国产一区二区三区免费观看| 国产麻豆欧美日韩一区| 国产乱妇无码大片在线观看| 国产成人精品网址| 99精品视频一区| 日本韩国欧美三级| 欧美日韩成人综合| 日韩视频一区二区在线观看| 911精品产国品一二三产区| 欧美欧美欧美欧美| 欧美va亚洲va| 国产精品国产精品国产专区不蜜| 综合自拍亚洲综合图不卡区| 亚洲一区二区三区中文字幕 | 精品国产乱码久久久久久影片| 欧美一区二区三区喷汁尤物| 精品久久久久久久久久久久久久久久久| 日韩精品一区二区三区中文不卡| 久久久亚洲精华液精华液精华液| 国产精品久久久久桃色tv| 亚洲激情第一区| 免费欧美日韩国产三级电影| 国产精品一区二区在线播放| av网站免费线看精品| 欧美伦理影视网| 久久免费的精品国产v∧| 中文字幕一区二区三区乱码在线 | 色综合一个色综合亚洲| 欧美日韩一区二区三区在线| 欧美videos大乳护士334| 国产精品久久久久久久久快鸭| 一区二区在线观看视频在线观看| 免费黄网站欧美| aaa亚洲精品| 欧美本精品男人aⅴ天堂| 中文字幕欧美一| 免费欧美高清视频| 97久久精品人人做人人爽50路| 51精品久久久久久久蜜臀| 日本一区二区三区免费乱视频| 亚洲国产一区二区三区青草影视| 精品制服美女久久| 欧美中文一区二区三区| 久久精品一二三| 亚洲电影第三页| 成人美女在线视频| 日韩久久久久久| 亚洲主播在线观看| 成人性色生活片免费看爆迷你毛片| 欧美日韩亚洲综合在线| 国产精品青草综合久久久久99| 青娱乐精品在线视频| 色婷婷狠狠综合| 国产日韩欧美精品在线| 日韩激情一二三区| 色综合一区二区| 日本一区免费视频| 久久99国产精品免费网站| 亚洲综合小说图片| 午夜久久久久久| 99精品视频一区| 国产亚洲人成网站| 麻豆免费精品视频| 欧美视频在线一区二区三区 | 亚洲伦在线观看| 国产一区二区调教| 欧美一区二区三区婷婷月色| 亚洲免费视频中文字幕| 成人午夜视频网站| 久久亚洲精精品中文字幕早川悠里| 亚洲h在线观看| 欧美在线免费观看视频| 自拍视频在线观看一区二区| 欧美一级日韩不卡播放免费| 日韩制服丝袜av| av不卡免费电影| 2023国产一二三区日本精品2022| 亚洲美女精品一区| 日韩中文字幕91| 欧洲精品一区二区三区在线观看| 国产情人综合久久777777| 九九久久精品视频| 亚洲欧洲无码一区二区三区| 中文字幕中文在线不卡住| 精品国产第一区二区三区观看体验| 欧美视频一区在线| 7777精品伊人久久久大香线蕉 | 青青草91视频| 4438x亚洲最大成人网| 亚洲图片欧美一区| 欧美主播一区二区三区| 一区二区三区四区高清精品免费观看 | 欧美精品一区二区三区高清aⅴ| 午夜成人在线视频| 欧美猛男男办公室激情| 日韩专区在线视频| 91精品一区二区三区久久久久久| 日韩精品一级中文字幕精品视频免费观看 | 91麻豆6部合集magnet| 亚洲欧美日韩系列| 欧美吻胸吃奶大尺度电影 | 免费在线一区观看| 26uuu另类欧美亚洲曰本| 国内成+人亚洲+欧美+综合在线| 精品成人佐山爱一区二区| 精品一区二区影视| 国产精品日韩精品欧美在线| 成人动漫一区二区在线| 亚洲男同1069视频| 欧美精品日韩一本| 久久66热偷产精品| 欧美高清一级片在线观看| 9人人澡人人爽人人精品| 亚洲欧美精品午睡沙发| 在线成人免费视频| 国产一区福利在线| 日本一二三不卡| 色综合一区二区| 日av在线不卡| 国产午夜精品美女毛片视频| 91污在线观看| 免费在线观看视频一区| 国产欧美一区二区三区网站| 92精品国产成人观看免费| 亚洲bdsm女犯bdsm网站| 久久亚洲精品国产精品紫薇| hitomi一区二区三区精品| 欧美日韩你懂的| 亚洲免费看黄网站| 欧美一区二区三区四区在线观看| 国产一区中文字幕| 亚洲欧洲综合另类| 日韩午夜精品电影| 成人视屏免费看| 日韩中文字幕麻豆| 国产喷白浆一区二区三区| 在线欧美一区二区| 国产在线不卡一区| 亚洲国产毛片aaaaa无费看| 精品国产伦一区二区三区观看方式 | 久久久久久一级片| 色婷婷激情综合| 精品在线一区二区三区| 亚洲另类春色校园小说| 精品理论电影在线| 一本高清dvd不卡在线观看| 久久激五月天综合精品| 亚洲欧美日韩国产成人精品影院| 日韩视频免费观看高清在线视频| 国产aⅴ精品一区二区三区色成熟| 亚洲最新视频在线播放| 久久精品免视看| 5566中文字幕一区二区电影| 成人国产一区二区三区精品| 五月婷婷综合在线| 国产精品卡一卡二| 欧美一区二区三区婷婷月色 | 国产性色一区二区| 7777精品伊人久久久大香线蕉最新版| 成人国产精品免费观看视频| 天堂一区二区在线| 亚洲日本欧美天堂| 国产午夜精品一区二区三区嫩草| 制服丝袜av成人在线看| 色综合天天综合网国产成人综合天 | 日本一区二区不卡视频| 日韩欧美综合一区| 欧美综合亚洲图片综合区| 国产精品1区二区.| 青青草国产成人av片免费| 亚洲六月丁香色婷婷综合久久 | 国产精品丝袜久久久久久app| 日韩手机在线导航| 欧美精品日日鲁夜夜添| 91黄色免费版| 99精品热视频| a在线欧美一区| 成人免费高清在线观看| 激情欧美一区二区三区在线观看| 亚洲成人av电影在线| 亚洲精品高清视频在线观看| 日本一区免费视频| 久久久三级国产网站| 日韩一区二区三区三四区视频在线观看| 在线免费亚洲电影| 欧美性极品少妇| 日本韩国欧美在线| 色婷婷激情综合| 色综合天天性综合| 91麻豆国产香蕉久久精品|