GDSX Manual

Service Routines
Extended General Device Support (GDSX) Manual134303
8-79
STOP^TASK
STOP^TASK
Any task can call this procedure to stop itself and deallocate TCB, IOCBs, FCBs and
other resources, such as all of the task’s allocations from the memory pools. Any
devices or processes opened against this task receive a file-system error 66. Any I/O not
yet completed is canceled. The USER^STOP exit is called, allowing you to clean up
any remaining work. If there is a backup process, it is updated.
Consideration
If a user task detects an E^STOP event by a call to WAIT^EVENT, the task should call
STOP^TASK.
TAKEBREAK
A task calls this procedure to take break ownership of the terminal it controls. To
release break ownership, call GIVEBREAK.
The BREAKENABLED configuration parameter determines whether user tasks can take
break ownership by the TAKEBREAK procedure. If BREAKENABLED is set to 1,
user tasks can successfully call the TAKEBREAK procedure. Otherwise, calls to
TAKEBREAK return file-system error 99.
When a task owns break and a break occurs, the -20 system message is routed to that
task by the pseudo-$RECEIVE file. It is the responsibility of the task to issue
^SETMODENOWAITs to restore the terminal to break access or normal access.
The Guardian break facility does not allow multiple openers in the same process to pass
break ownership back and forth. Therefore, only one task at a time within a GDSX
process may own break for a particular terminal. This may be ensured by
preconfiguring all terminals with the ASSOCIATIVE attribute set or by setting the
ASSOCIATIVE configuration parameter for the GDSX process itself.
Consideration
If GDSX is being run as a process pair, a task calling this procedure will be suspended if
during the execution of the procedure in TSCODE the checkpoint semaphore is not
obtained immediately.
CALL STOP^TASK
CALL TAKEBREAK