Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XULMRPC

XULMRPC.m

Go to the documentation of this file.
  1. XULMRPC ;IRMFO-ALB/CJM/SWO/RGG - KERNEL LOCK MANAGER ;10/15/2012
  1. ;;8.0;KERNEL;**608**;JUL 10, 1995;Build 84
  1. ;;Per VA Directive 6402, this routine should not be modified
  1. ;
  1. ; ******************************************************************
  1. ; * *
  1. ; * The Kernel Lock Manager is based on the VistA Lock Manager *
  1. ; * developed by Tommy Martin. *
  1. ; * *
  1. ; ******************************************************************
  1. ;
  1. ;
  1. LOCKS(RETURN,LOCKS,RESULT,SCREEN) ; Compile lock table
  1. ;
  1. ;Inputs:
  1. ; LOCKS - the global location to set the data, referenced by indirection
  1. ; SCREEN = 1 if system locks should be screened out, 0 otherwise
  1. ; RESULT - global location to store the result
  1. ;Outputs:
  1. ; @LOCKS will contain the locks obtained from the lock table
  1. ; RETURN - return variable required for a RPC (doesn't seem to work)
  1. ; @RESULT - global location where result is placed 1 if success, 0 otherwise
  1. ;
  1. D GETLOCKS^XULMU(LOCKS)
  1. S:$L($G(RESULT)) @RESULT=1
  1. S RETURN=1
  1. Q RETURN
  1. ;
  1. ;
  1. KILLPROC(RETURN,PID,RESULT) ;
  1. ;Description:
  1. ; Kills the process identified to OS by PID
  1. ;Inputs:
  1. ; PID -
  1. ; RESULT - global location to store the result
  1. ;Outputs:
  1. ; RETURN - return variable required for a RPC (doesn't seem to work)
  1. ; @RESULT - global location where result is placed - 1 if success, 0 otherwise
  1. ;
  1. D
  1. .N $ETRAP S $ETRAP="G ERROR^XULMRPC"
  1. .S RETURN=$$KILL^%ZLMLIB(PID)
  1. S:$L($G(RESULT)) @RESULT=RETURN
  1. I RETURN D CLEANUP^XULMU(PID)
  1. Q RETURN
  1. ;
  1. ERROR ;
  1. S $ETRAP="Q:$QUIT """" Q"
  1. S $ECODE=""
  1. Q:$QUIT ""
  1. Q