GDSX (Extended General Device Support) Manual

Service Routines
Extended General Device Support (GDSX) Manual529931-001
8-28
^FNAMEEXPAND
CALL VSEM(DISKSEM);
END
ELSE
BEGIN !UNABLE TO GET THE LOCK
.!WITHIN 2 SECONDS
.
END;
^FNAMEEXPAND
This procedure expands a partial file name from the compacted external form to the
12-word internal form usable by other file-system procedures. ^FNAMEEXPAND may
be called whether USCODE is converted or unconverted.
Except for the following consideration, the syntax, condition code settings, and
considerations regarding this procedure are the same as the counterpart in the
Guardian Procedure Calls Reference Manual.
Consideration
The ^FNAMEEXPAND procedure is defined as VARIABLE, which allows you to call it
with only the external-filename and internal-filename parameters. In this
case, GDSX submits the call with these two parameters to the Guardian
FNAMEEXPAND procedure, supplying FNAMEEXPAND with the default volume and
subvolume (from which the GDSX process was started), which is stored in a TSCODE
global variable.
If USCODE submits its own default volume and subvolume parameter to
^FNAMEEXPAND, then GDSX passes this to Guardian FNAMEEXPAND instead of
the default volume and subvolume name stored in the TSCODE global variable.
GET^CPSEM
This procedure allows a task to acquire the checkpoint semaphore maintained
internally by TSCODE in order to checkpoint data. Once the checkpoint semaphore is
obtained, the task can call Q^CP[X] to queue data in TSCODEs checkpoint buffer, and
then call DO^CP or ^CHECKPOINT to actually copy the data to the backup process.
There is only one checkpoint semaphore, so a task obtaining this semaphore is
guaranteed that no other task (system or user task) can initiate a checkpoint operation
until the semaphore is released by means of GIVE^CPSEM. Therefore, the data that
is queued by a call to Q^CP[X] cannot be corrupted by another task.
If a task attempts to get the checkpoint semaphore when it is held by another task, the
task calling GET^CPSEM is suspended and put on a wait queue. (See INIT^SEM on
page 8-41 for an explanation of the queuing mechanism.) After acquiring the
semaphore the task may call Q^CP[X].