| rev |
line source |
|
msach@134
|
1 /*
|
|
msach@134
|
2 * File: requests.h
|
|
msach@134
|
3 * Author: msach
|
|
msach@134
|
4 *
|
|
msach@134
|
5 * Created on September 16, 2011, 3:11 PM
|
|
msach@134
|
6 */
|
|
msach@134
|
7
|
|
msach@134
|
8 #ifndef REQUESTS_H
|
|
msach@134
|
9 #define REQUESTS_H
|
|
msach@134
|
10
|
|
msach@134
|
11 #include "ProcrContext.h"
|
|
msach@134
|
12
|
|
msach@134
|
13 typedef struct _InterMasterReqst InterMasterReqst;
|
|
msach@134
|
14
|
|
msach@134
|
15 //============= Requests ===========
|
|
msach@134
|
16 //
|
|
msach@134
|
17
|
|
msach@134
|
18 //VMS Request is the carrier for Slave to Master requests
|
|
msach@134
|
19 // it has an embedded sub-type request that is pulled out
|
|
msach@134
|
20 // inside the plugin's request handler
|
|
msach@134
|
21 enum VMSReqstType //For Slave->Master requests
|
|
msach@134
|
22 {
|
|
msach@134
|
23 semantic = 1, //avoid starting enums at 0, for debug reasons
|
|
msach@134
|
24 createReq,
|
|
msach@134
|
25 dissipate,
|
|
msach@134
|
26 VMSSemantic //goes with VMSSemReqst below
|
|
msach@134
|
27 };
|
|
msach@134
|
28
|
|
msach@134
|
29 struct _VMSReqst
|
|
msach@134
|
30 {
|
|
msach@134
|
31 enum VMSReqstType reqType;//used for dissipate and in future for IO requests
|
|
msach@134
|
32 void *semReqData;
|
|
msach@134
|
33
|
|
msach@134
|
34 VMSReqst *nextReqst;
|
|
msach@134
|
35 };
|
|
msach@134
|
36 //VMSReqst
|
|
msach@134
|
37
|
|
msach@134
|
38 //This is a sub-type of Slave->Master requests.
|
|
msach@134
|
39 // It's for Slaves to invoke built-in VMS-core functions that have language-like
|
|
msach@134
|
40 // behavior.
|
|
msach@134
|
41 enum VMSSemReqstType //These are equivalent to semantic requests, but for
|
|
msach@134
|
42 { // VMS's services available directly to app, like OS
|
|
msach@134
|
43 createProbe = 1, // and probe services -- like a VMS-wide built-in lang
|
|
msach@134
|
44 openFile,
|
|
msach@134
|
45 otherIO
|
|
msach@134
|
46 };
|
|
msach@134
|
47
|
|
msach@134
|
48 typedef struct
|
|
msach@134
|
49 { enum VMSSemReqstType reqType;
|
|
msach@134
|
50 VirtProcr *requestingPr;
|
|
msach@134
|
51 char *nameStr; //for create probe
|
|
msach@134
|
52 }
|
|
msach@134
|
53 VMSSemReq;
|
|
msach@134
|
54
|
|
msach@134
|
55 //These are for Master to Master requests
|
|
msach@134
|
56 // They get re-cast to the appropriate sub-type of request
|
|
msach@134
|
57 enum InterMasterReqstType //For Master->Master
|
|
msach@134
|
58 {
|
|
msach@134
|
59 destVMSCore = 1, //avoid starting enums at 0, for debug reasons
|
|
msach@134
|
60 destPlugin
|
|
msach@134
|
61 };
|
|
msach@134
|
62
|
|
msach@134
|
63 struct _InterMasterReqst //Doing a trick to save space & time -- allocate
|
|
msach@134
|
64 { // space for a sub-type then cast first as InterMaster then as sub-type
|
|
msach@134
|
65 enum InterMasterReqstType reqType;
|
|
msach@134
|
66 InterMasterReqst *nextReqst;
|
|
msach@134
|
67 };
|
|
msach@134
|
68 //InterMasterReqst (defined above in typedef block)
|
|
msach@134
|
69
|
|
msach@134
|
70
|
|
msach@134
|
71 //These are a sub-type of InterMaster requests. The inter-master req gets
|
|
msach@134
|
72 // re-cast to be of this type, after checking
|
|
msach@134
|
73 //This ones for requests between internals of VMS-core.. such as malloc
|
|
msach@134
|
74 enum InterVMSCoreReqType
|
|
msach@134
|
75 {
|
|
msach@134
|
76 transfer_free_ptr = 1 //avoid starting enums at 0, for debug reasons
|
|
msach@134
|
77 };
|
|
msach@134
|
78
|
|
msach@134
|
79 //Doing a trick to save space & time -- allocate space
|
|
msach@134
|
80 // for this, cast first as InterMaster then as this
|
|
msach@134
|
81 typedef struct
|
|
msach@134
|
82 {
|
|
msach@134
|
83 enum InterMasterReqstType reqType; //duplicate InterMasterReqst at top
|
|
msach@134
|
84 InterMasterReqst *nextReqst;
|
|
msach@134
|
85
|
|
msach@134
|
86 enum InterVMSCoreReqType secondReqType;
|
|
msach@134
|
87 void *freePtr; //pile up fields, add as needed
|
|
msach@134
|
88 } InterVMSCoreReqst;
|
|
msach@134
|
89
|
|
msach@134
|
90 //This is for requests between plugins on different cores
|
|
msach@134
|
91 // Here, after casting, the pluginReq is extracted and handed to plugin
|
|
msach@134
|
92 //Doing a trick to save space & time -- allocate space
|
|
msach@134
|
93 // for this, cast first as InterMaster then as this
|
|
msach@134
|
94 typedef struct
|
|
msach@134
|
95 {
|
|
msach@134
|
96 enum InterMasterReqstType reqType; //copy InterMasterReqst at top
|
|
msach@134
|
97 InterMasterReqst *nextReqst;
|
|
msach@134
|
98
|
|
msach@134
|
99 void *pluginReq; //plugin will cast to approp type
|
|
msach@134
|
100 } InterPluginReqst;
|
|
msach@134
|
101
|
|
msach@134
|
102 #endif /* REQUESTS_H */
|
|
msach@134
|
103
|