1    /* 
     2     * Copyright (c) 2009, Texas Instruments Incorporated
     3     * All rights reserved.
     4     *
     5     * Redistribution and use in source and binary forms, with or without
     6     * modification, are permitted provided that the following conditions
     7     * are met:
     8     *
     9     * *  Redistributions of source code must retain the above copyright
    10     *    notice, this list of conditions and the following disclaimer.
    11     *
    12     * *  Redistributions in binary form must reproduce the above copyright
    13     *    notice, this list of conditions and the following disclaimer in the
    14     *    documentation and/or other materials provided with the distribution.
    15     *
    16     * *  Neither the name of Texas Instruments Incorporated nor the names of
    17     *    its contributors may be used to endorse or promote products derived
    18     *    from this software without specific prior written permission.
    19     *
    20     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    21     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    22     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    23     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    24     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    25     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    26     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    27     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    28     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    29     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    30     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    31     * 
    32     */
    33    /*!
    34     *  ======== RMAN ========
    35     *  Resource Manager for shared C64x+ resources.
    36     */
    37    @Template("./RMAN.xdt")
    38     
    39    metaonly module RMAN {
    40    
    41        /*!
    42         *  ======== tableSize  ========
    43         * Total number of individual resource manager (IRESMAN implementation) 
    44         * entries that will be registered with RMAN (including both static and 
    45         * dynamic)
    46         */
    47        config UInt tableSize = 10;
    48    
    49        /*!
    50         *  ======== maxAlgs  ========
    51         * Maximum number of algorithm instances that will be using the RMAN 
    52         * module. 
    53         */
    54        config UInt maxAlgs = 32;
    55    
    56        /*!
    57         *  ======== useDSKT2 ========
    58         *  Flag indicating if DSKT2 should be used for memory allocation and
    59         *  for supporting algorithm yields.    
    60         *
    61         *  Setting this flag to `false` will disable cooperative preemption support
    62         *  for algorithms in RMAN.
    63         */
    64        config Bool useDSKT2 = true;
    65    
    66        /*!
    67         *  ======== persistentAllocFxn ========
    68         *  Function for allocating persistent memory for RMAN's and other IRESMAN
    69         *  implementation's internal objects.
    70         *
    71         *  This is required to be supplied ONLY if {@link #useDSKT2} is set to
    72         *  `false`.
    73         */
    74        config String persistentAllocFxn = null;
    75     
    76        /*!
    77         *  ======== persistentFreeFxn ========
    78         *  Function for freeing persistent memory used by RMAN and other IRESMAN
    79         *  implementation's internal objects.
    80         *
    81         *  This is required to be supplied ONLY if {@link #useDSKT2} is set to
    82         *  `false`.
    83         */
    84        config String persistentFreeFxn = null;
    85    
    86        /*!
    87         *  ======== yieldSamePriority ========
    88         * Flag indicating if yields to same priority should happen or not
    89         *
    90         * This is required only if {@link #useDSKT2} is set to `true`.
    91         */
    92        config bool yieldSamePriority = false;
    93    
    94        /*!
    95         *  ======== semCreateFxn ========
    96         * Function to create semaphores used by various individual resource 
    97         * manager(s) registered with RMAN.
    98         *
    99         *  Function signature is:
   100         *  @p(code)
   101         * Void * _semCreate(Int key, Int count);
   102         */
   103        config String semCreateFxn = null;
   104    
   105        /*!
   106         *  ======== semDeleteFxn ========
   107         * Function to delete semaphores used by various individual resource 
   108         * manager(s) registered with RMAN.
   109         *
   110         *  Function signature is:
   111         *  @p(code)
   112         *  Void _semDelete(Void * sem);
   113         */
   114        config String semDeleteFxn = null;
   115    
   116        /*!
   117         *  ======== semPendFxn ========
   118         * Function to pend on semaphores used by various resource manager(s) 
   119         * registered with RMAN.
   120         *
   121         *  Function signature is:
   122         *  @p(code)
   123         *  Int _semPend(Void * sem, UInt32 timeout);
   124         */
   125        config String semPendFxn = null;
   126        
   127        /*!
   128         *  ======== semPostFxn ========
   129         * Function to post on Semaphores used by various resource manager(s) 
   130         * registered with RMAN.
   131         *
   132         *  Function signature is:
   133         *  @p(code)
   134         * Void _semPost(Void * sem); 
   135         */
   136        config String semPostFxn = null;
   137    
   138        /*!
   139         *  ======== debug ========
   140         *  Enable the debug profile of the RMAN module.
   141         *
   142         *  This will result in a larger and slower library being linked in,
   143         *  but it will provide extra parameter checking to ensure callers are
   144         *  meeting the API requirements.
   145         *
   146         *  If these API requirements are not met, `SYS_abort()` will be called.
   147         *  @_nodoc   
   148         */
   149        config bool debug = false;
   150    
   151        /*!
   152         *  ======== trace ========
   153         *  Enable trace in the RMAN library.
   154         *
   155         *  This will result in a larger and slower library being linked in,
   156         *  but it will provide trace statements for debugging purposes.
   157         *  @_nodoc   
   158         */
   159        config bool trace = false;
   160    
   161        /*!
   162         *  ======== lockFxn ========
   163         *  Deprecated
   164         *  Function for handling the release and lock of scratch groups required
   165         *  during yield to higher or same priority algorithm
   166         *  Void _acquireLock(Int scratchId);
   167         * @_nodoc
   168         */
   169        config String lockFxn = null;
   170     
   171        /*!
   172         *  ======== unlockFxn ========
   173         *  Deprecated
   174         *  Function for handling the release and lock of scratch groups required
   175         *  during yield to higher or same priority algorithm
   176         *  Void _releaseLock(Int scratchId);
   177         * @_nodoc
   178         */
   179        config String unlockFxn = null;
   180     
   181        /*!
   182         *  ======== setContext ========
   183         *  Deprecated
   184         *  Function for handling setting and obtaining the Yield context of a
   185         *  scratch group during yield to higher or same priority algorithm
   186         *  Void _setContext(Int scratchId, IRES_YieldContextHandle context);
   187         * @_nodoc
   188         */
   189        config String setContextFxn = null;
   190    
   191        /*!
   192         *  ======== getContext ========
   193         *  Deprecated
   194         *  Function for handling setting and obtaining the Yield context of a
   195         *  scratch group during yield to higher or same priority algorithm
   196         *  IRES_YieldContextHandle _getContext(Int scratchId);
   197         * @_nodoc
   198         */
   199        config String getContextFxn = null;
   200     
   201        /*!
   202         *  ======== yieldFxn ========
   203         *  Deprecated
   204         *  Function to call to yield to another task of the same priority.
   205         *  Required only if the yieldSamePriority flag is set to "true".
   206         * @_nodoc
   207         */
   208        config String yieldFxn = null;
   209    }
   210    /*
   211     *  @(#) ti.sdo.fc.rman; 2, 0, 0,185; 11-8-2009 20:58:27; /db/atree/library/trees/fc/fc-l04x/src/
   212     */
   213