Event Control Blocks
Each queue anchor is associated with an event control block (ECB). Tasks use ECBs to notify each other when they must perform work. Tasks also monitor their own ECBs to determine when they have received requests to perform work. Each ECB is a fullword in length and contains the following sections:
| Bits | Purpose |
|---|---|
| 0 | Indicates that a task has issued the GCS WAIT macro on this ECB. Only one task at a time can wait on a specific ECB. |
| 1 | Indicates that a task has issued the GCS POST macro for this ECB. |
| 2-31 | May contain more information about the work request. |
Most RSCS tasks respond to several types of work requests. For example, the AXM task may receive stop requests, commands, or new files. In this case, the task may contain an ECB list. The ECB list contains the addresses that represent each type of work the task may process. The ECBs do not have to be together in storage, but the ECB list must contain a contiguous list of addresses. To identify the end of the ECB list, bit 0 in the last address of the ECB list is set to 1.