GDSX Manual
Intertask Communication Example
Extended General Device Support (GDSX) Manual–134303
E-4
USAMPLE3
25. ! | ********* | |
!
26. ! | Read ITC msg | <--/
!
27. ! | |
!
28. ! | Msg on device |-----------------> (Term)
!
29. ! | |
!
30. ! | NOTIFY^IO^COMP|
!
31. ! |_______________|
!
32. !
!
33. ! This message exchange works the other way too. Task2 sends its messages
!
34 ! from $RECEIVE as intertask messages to Task1.
!
51.
!******************************************************************************
53. NAME Uscode;
54. BLOCK COMMON^TEMPLATES;
55. ?NOLIST, SOURCE DCCBDECS (Events)
57. ?NOLIST, SOURCE DCCBDECS (ERRORS)
59. ?NOLIST, SOURCE DCCBDECS (TCB^LAYOUT)
61. ?NOLIST, SOURCE DCCBDECS (IOCB^LAYOUT)
63. ?NOLIST, SOURCE DCCBDECS (FCB^LAYOUT)
65. ?NOLIST, SOURCE DCCBDECS (RCB^LAYOUT)
67. !===========================================================================
68. !Comment Users may include their own file to modify DCB and LINE templates.
69. !Comment See file ULHDECS that USAMPLE sources in here
70. ?NOLIST, SOURCE ULHDECSE(DCB^Template, Line^Template)
73. END BLOCK; ! COMMON^TEMPLATES
74.
75. BLOCK CONFIG^PARMS^TEMPLATES;
76. ?NOLIST, SOURCE DCCBDECS (CONFIG^TEMPLATES)
78. END BLOCK; ! CONFIG^PARMS^TEMPLATES
79.
80. ! Global Data
81. !
82. BLOCK CONFIG^PARMS^DATA;
83. ?NOLIST, SOURCE DCCBDECS (CONFIG^DATA)
85. END BLOCK; ! CONFIG^PARMS^DATA
86.
87. BLOCK COMMON^DATA;
88. ?NOLIST, SOURCE DCCBDECS (COMMON^DATA)
90. END BLOCK; ! COMMON^DATA
91.
92. BLOCK USER^PRIVATE;
93. LITERAL TRUE = -1,
94. FALSE = 0;
95. END BLOCK; !USER^PRIVATE
96.
97. !===========================================================================
98. ! User may include System Procedures desired here.
99. ?NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS0(DEBUG, NUMOUT, NUMIN);
101. !===========================================================================
102. ?NOLIST, SOURCE PEXTGDS
104.
106. !***************************************************************************
107. PROC DEVICE^HANDLER (TERM^FILE^NUM, INTERNAL^TERM^NO, TERM^TYPE);
108.
!****************************************************************************
109. INT TERM^FILE^NUM , ! file number for this D^H task
110. INTERNAL^TERM^NO, ! terminal number for this D^H task
111. TERM^TYPE ; ! terminal type
112.
113. BEGIN
114. !===========================================================================
115. ! USCODE can declare desired DEVICE^HANDLER local variables here
116. !===========================================================================
117.