1    /* 
     2     *  Copyright (c) 2008 Texas Instruments. All rights reserved.
     3     *  This program and the accompanying materials are made available under the
     4     *  terms of the Eclipse Public License v1.0 and Eclipse Distribution License
     5     *  v. 1.0 which accompanies this distribution. The Eclipse Public License is
     6     *  available at http://www.eclipse.org/legal/epl-v10.html and the Eclipse
     7     *  Distribution License is available at
     8     *  http://www.eclipse.org/org/documents/edl-v10.php.
     9     *
    10     *  Contributors:
    11     *      Texas Instruments - initial implementation
    12     * */
    13    /*
    14     *  ======== GateH.xdc ========
    15     */
    16    
    17    import xdc.runtime.IGateProvider;
    18    
    19    /*!
    20     *  ======== GateH ========
    21     *  Provides APIs to protect critical sections when an IGate.Handle is
    22     *  available.
    23     *
    24     *  An application can isolate itself from IGate implementations by using
    25     *  this module. The application must first obtain an IGate.Handle.
    26     *  It can get such a handle by directly calling {@link GateThread#create} or
    27     *  {@link GateProcess#create}. Then the application can use the generic
    28     *  APIs provided by this module.
    29     *
    30     *  The underlying gates are nexting in nature and users have to leave
    31     *  the gate as many times as they entered it.
    32     */
    33    @DirectCall
    34    @RomConsts
    35    
    36    module GateH
    37    {
    38        /*!
    39         *  Proxy used for optimization.
    40         *
    41         *  If ALL IGateProvider.Handles used by GateH are created using the same
    42         *  module (e.g GateProcess) then setting this Proxy to GateProcess and
    43         *  setting GateH.Proxy.abstractInstances$ = false, causes
    44         *  GateH APIs can have better performance.
    45         */
    46        proxy Proxy inherits IGateProvider;
    47    
    48        /*!
    49         * ======== enter ========
    50         * Enter a gate
    51         *
    52         * @param(hdl)    IGateProvider.Handle
    53         * @a(returns)    key
    54         */
    55        IArg enter(IGateProvider.Handle hdl);
    56    
    57        /*!
    58         * ======== leave ========
    59         * Leave a gate
    60         *
    61         * @param(hdl)    IGateProvider.Handle
    62         * @param(key)    key returned by enter();
    63         */
    64        Void leave(IGateProvider.Handle hdl, IArg key);
    65    }
    66    /*
    67     *  @(#) xdc.runtime.knl; 1, 0, 0,0; 7-26-2016 11:46:36; /db/ztree/library/trees/xdc/xdc-B21/src/packages/
    68     */
    69