GDSX (Extended General Device Support) Manual
Design and Development
Extended General Device Support (GDSX) Manual—529931-001
2-17
User Code Declarations
•
Resource maps
•
SPI definitions
Some of these declarations are public to USCODE (user code can source them in at
compile time). The data structures accessible to user code are:
•
I/O control block template (iocb^template)
•
Device control block template (dcb^template)
•
Task control block template (tcb^template)
•
Line control block template (lcb^template)
•
Receive control block template (rcb^template)
•
File control block template (fcb^template)
•
Device control block address table (DCBTBL global)
•
Task control block table (TCBTBL global)
•
Line control block table (LINETBL global)
•
File control block table (FCBTBL global)
•
Map template structure for resource map usage
•
Configuration data template
•
Event mask definitions and event result literals
•
Guardian file error code literals
User Code Declarations
Because multiple copies of a USCODE procedure can be running at the same time in a
multithreaded GDSX environment, USCODE variables must be defined properly. If the
value of a variable is unique for each task at run time, declare the variable as a local
variable. If a variable must be shared among tasks, declare the variable as a global.
For read-only globals, the shared extended pool (see Memory Pools on page 2-24)
may be used. For globals to be updated, semaphore control may be necessary (see
Semaphore Control on page 2-39).
Global Declarations
Typically user code has global data blocks, such as common^data and user^private—
see the example listings in Appendix B, USKELEX and USKELEXC Listings. (The
names common^data and user^private are used throughout this manual, although you
can use other names for these data blocks.) Global data within the common^data
Caution. Before altering a global used by TSCODE, make sure you know what TSCODE is
doing with it.