1 2 3 4 5 6 7 8 9 10 11 12
13 14 15
16
17 /*!
18 * ======== SyncGeneric ========
19 * Generic ISync implementation
20 *
21 * This module allows users to plug in their own
22 * functions for signal, wait and query.
23 */
24
25 module SyncGeneric inherits xdc.runtime.knl.ISync
26 {
27 /*! typedef for user specified signal function */
28 typedef Void (*SignalFunc)(UArg);
29
30 /*! typedef for user specified wait function */
31 typedef Bool (*WaitFunc)(UArg, UInt);
32
33 /*! typedef for user specified wait function */
34 typedef Bool (*QueryFunc)(Int);
35
36 instance:
37 /*! user signal function */
38 config SignalFunc userSignal = null;
39
40 /*! user signal function arg */
41 config UArg signalArg = null;
42
43 /*! user wait function */
44 config WaitFunc userWait = null;
45
46 /*! user wait function arg */
47 config UArg waitArg = null;
48
49 /*! user query function */
50 config QueryFunc userQuery = null;
51
52 internal:
53
54
55 struct Instance_State {
56 SignalFunc userSignal;
57 UArg signalArg;
58 WaitFunc userWait;
59 UArg waitArg;
60 QueryFunc userQuery;
61 };
62
63 }
64 65 66
67