GDSX Manual

Service Routines
Extended General Device Support (GDSX) Manual134303
8-51
^OPEN
buffer input
is a pointer to a buffer. If buffer is omitted, no field of the IOCB is changed.
Consideration
iocb must reference a real IOCB. If its address is 0, then GDSX stops with internal error
220.
Example
See the “LINE^HANDLER Example Code” on page 7-12.
^OPEN
By calling the ^OPEN procedure, one task can establish a communication path between
all user tasks and a file. ^OPEN may be called whether USCODE is converted or
unconverted.
Except for the following considerations, the syntax, condition code settings, and
considerations regarding this procedure are the same as the OPEN procedure in the
Guardian Procedure Calls Reference Manual.
Considerations
Calling ^OPEN in a nowaited mode causes the calling task to be suspended.
Because the working stack images of tasks are swapped to and from an extended
data segment during I/O operations, I/O must be performed to and from global
buffers.
If the flags parameter is supplied and bit 8 is set for a nowaited call, USCODE
should not issue a subsequent ^AWAITIO. TSCODE takes care of issuing an
AWAITIO to Guardian to return the information to the calling task. No additional
user code is necessary to complete the call.
^OPEN does not support PFS buffering; ^FILE_OPEN_ does support PFS buffering.
When a user task calls ^OPEN, the resulting open may be private to that task or
public to all tasks in the GDSX process. The distinction made by TSCODE is based
on the address of the filenum parameter passed to ^OPEN: if the address is local to
the task or is in the upper 32K words of the user data segment, the open is
considered private; if the address is in user globals or the buffer pool (anywhere
below %73000), the open is considered public.
INT:ref (Use with NOTIFY^IO^COMPLETION.)
INT .EXT:ref (Use with NOTIFY^IO^COMPLETIONX.)
Caution. When a user task stops, TSCODE automatically closes all of the tasks private opens
but leaves public opens open, because other tasks may be using them.