Google
 

Trailing-Edge - PDP-10 Archives - RMS-10_T10_704_FT2_880425 - 10,7/rms10/rmssrc/rmsrel.b36
There are 6 other files named rmsrel.b36 in the archive. Click here to see a list.
MODULE RELEAS =


BEGIN

GLOBAL BIND	RELSV = 1^24 + 0^18 + 1;	!EDIT DATE: 12-JAN-76


%([

FUNCTION:	THIS MODULE CONTAINS ALL ROUTINES WHICH PROCESS
		THE $RELEASE MACRO .

THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.

!COPYRIGHT (C) 1977, 1979 BY DIGITAL EQUIPMENT CORPORATION


AUTHOR:	S. BLOUNT


**********	TABLE OF CONTENTS	**************




	ROUTINE			FUNCTION
	=======			========

	$RELEASE		PRECESSOR FOR $RELEASE MACRO


REVISION HISTORY:

EDIT	DATE		WHO		PURPOSE
====	====		===		=========

1	12-JAN-76	SB		DISABLE $RELEASE (USE $FREE INSEAD)

*************************************************
*						*
*		NEW REVISION HISTORY		*
*						*
*************************************************

PRODUCT	MODULE	 SPR
 EDIT	 EDIT	 QAR		DESCRIPTION
======	======	=====		===========


	***** END OF REVISION HISTORY *****




])%


EXTERNAL	LOCKIT,
		RSETUP;

%([ ERROR MESSAGES REFERENCED WITHIN THIS MODULE ])%






REQUIRE 'RMSREQ';
EXTDECLARATIONS;




! $RELEASE
! ========
! PROCESSOR FOR $RELEASE MACRO
!	THIS ROUTINE UNLOCKS THE CURRENT RECORD, IF ANY.
!	FOR INDEXED FILES, THIS INVOLVES RELEASING THE CURRENT
!	BUCKET. FOR SEQUENTIAL AND RELATIVE FILES, THE CURRENT
!	RECORD IS UNLOCKED.
!
! FORMAT OF THE $RELEASE MACRO:
!
!		$RELEASE	<RAB-NAME> [,<ERROR-ADDRESS>]
!
! RAB FIELDS USED AS INPUT TO $RELEASE:
!
!	ISI		INTERNAL STREAM IDENTIFIER
!
! RAB FIELDS RETURNED BY $RELEASE:
!
!	STS		COMPLETION STATUS CODE
!	STV		ADDITIONAL STATUS INFORMATION
!

	%([*** NOTE: THE $RELEASE MACRO IS CURRENTLY DISABLED***])%


! INPUT:
!	ADDRESS OF USER RAB
!	ADDRESS OF USER ERROR ROUTINE

! OUTPUT:
!	<NONE>

! GLOBALS USED:
!	LOCKIT

GLOBAL ROUTINE %NAME('$RELEASE')  ( BLOCK, ERRORRETURN ):NOVALUE =
BEGIN
	ARGUMENT (BLOCK,BASEADD);
	ARGUMENT (ERRORRETURN,BASEADD);

LOCAL USERRFA;
EXTERNAL LOCKIT;

	%([ ****DISABLE THE $RELEASE MACRO TEMPORARILY**** ])%

	USERERROR ( ER$IOP );

!
!	%([ GET ISI AND FILE JFN ])%
!
!	RAB = .BLOCK;				! GET RAB
!	ERRADR = .ERRORRETURN;			! AND USER ADDRESS
!
!	%([ ESTABLISH SYSTEM-WIDE POINTERS AND DON'T WORRY
!	   ABOUT THE CONTENTS OF THE FAC FIELD ])%
!
!	CALLRSETUP ( PCI ( TRUE ) );		! JUST SET UP GLOBAL POINTERS
!	TRACE ('$RELEASE');
!
!
!	%([ UNLOCK THIS RECORD ])%
!
!	IF ( USERRFA = .RAB [ RABRFA ] ) LEQ ZERO THEN ERROR ( ER$RFA );	! DONT ALLOW BAD RFA'S
!;		! GET RFA
!	IF .USERRFA IS .RST [ RSTDATARFA ] THEN %WE MUST REMEMBER ITS UNLOCKED%
!		CLRFLAG ( RST [ RSTFLAGS ] , FLGDLOCK );
!
!	%([ DON'T UNLOCK ANYTHING IF WE ARENT LOCKING ])%
!
!	IF LOCKING 
!	THEN
!		BEGIN
!		IF CALLLOCKIT ( %JSYS%		PCI (DEQCALL),
!				%FUNCTION%	PCI (DEQDR),
!				%ID%		LCI (USERRFA),
!				%ACCESS%	PCI ( ZERO ),
!				%TYPE%		PCI (LTYPEREC))
!			IS FALSE THEN ERROR (ERRNL)
!		END; %( OF IF LOCKING) %
!
!	RAB [ RABRFA ] = ZERO;			! FOR SAFETY
	USEREXIT
END;	%( OF $RELEASE)%
END
ELUDOM