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 @RomConsts
25
26 module SyncGeneric inherits xdc.runtime.knl.ISync
27 {
28 /*! typedef for user specified signal function */
29 typedef Void (*SignalFunc)(UArg);
30
31 /*! typedef for user specified wait function */
32 typedef Bool (*WaitFunc)(UArg, UInt);
33
34 /*! typedef for user specified wait function */
35 typedef Bool (*QueryFunc)(Int);
36
37 instance:
38 /*! user signal function */
39 config SignalFunc userSignal = null;
40
41 /*! user signal function arg */
42 config UArg signalArg = null;
43
44 /*! user wait function */
45 config WaitFunc userWait = null;
46
47 /*! user wait function arg */
48 config UArg waitArg = null;
49
50 /*! user query function */
51 config QueryFunc userQuery = null;
52
53 internal:
54
55
56 struct Instance_State {
57 SignalFunc userSignal;
58 UArg signalArg;
59 WaitFunc userWait;
60 UArg waitArg;
61 QueryFunc userQuery;
62 };
63
64 }
65 66 67
68