1 2 3 4 5 6 7 8 9 10 11 12
13 14 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
35 module GateH
36 {
37 /*!
38 * Proxy used for optimization.
39 *
40 * If ALL IGateProvider.Handles used by GateH are created using the same
41 * module (e.g GateProcess) then setting this Proxy to GateProcess and
42 * setting GateH.Proxy.abstractInstances$ = false, causes
43 * GateH APIs can have better performance.
44 */
45 proxy Proxy inherits IGateProvider;
46
47 /*!
48 * ======== enter ========
49 * Enter a gate
50 *
51 * @param(hdl) IGateProvider.Handle
52 * @a(returns) key
53 */
54 IArg enter(IGateProvider.Handle hdl);
55
56 /*!
57 * ======== leave ========
58 * Leave a gate
59 *
60 * @param(hdl) IGateProvider.Handle
61 * @param(key) key returned by enter();
62 */
63 Void leave(IGateProvider.Handle hdl, IArg key);
64 }
65 66 67
68