<> <> <> <> DIRECTORY BasicTime, Commander, ComputeServerClient, ComputeServerCallbacksRpcControl, ComputeServerControllerRpcControl, ComputeServerDebuggerRpcControl, ComputeServerServer, ComputeServerStatistics, ComputeServerUserRpcControl, InterpreterToolPrivate, IO, PrincOps, PupDefs, Rope, RPC, RuntimeError, SymTab; ComputeServerInternal: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; IdleTransitionsEnabled: BOOL; ActiveServices: INT; -- count of currently active services myHostName: ROPE; MyNetAddressRope: ROPE; ControllerGVName: ROPE; RemoteCommandDir: ROPE; LocalCommandDir: ROPE ; OKToUseLocalDisk: BOOL; RegisteredProcObject: TYPE = ComputeServerServer.RegisteredProcObject; <<>> <> <> <> <> <<];>> RegisteredProcHandle: TYPE = REF RegisteredProcObject; PackageEntryObject: TYPE = RECORD [ package: ROPE _ NIL, dfCreate: BasicTime.GMT _ BasicTime.nullGMT, commands: LIST OF ROPE _ NIL, maintainer: LIST OF ROPE _ NIL, latestVersion: ROPE _ NIL, runVersion: ROPE _ NIL, exclusive: BOOL _ FALSE, maxCountActive: INT _ 10000, nowActive: INT _ 0 ]; PackageEntry: TYPE = REF PackageEntryObject; PackageTable: SymTab.Ref; CmdEntryObject: TYPE = RECORD [ service: ROPE _ NIL, package: ROPE _ NIL, version: ROPE _ NIL, firstTime: BOOL _ TRUE, doQueueing: BOOL _ FALSE, okToQueuePosted: BOOL _ FALSE ]; CmdEntry: TYPE = REF CmdEntryObject; ConfigEntryObject: TYPE = RECORD [ package: ROPE _ NIL, dfCreate: BasicTime.GMT _ BasicTime.nullGMT, maintainer: LIST OF ROPE _ NIL ]; ConfigEntry: TYPE = REF ConfigEntryObject; ConfigTable: PUBLIC SymTab.Ref; ActiveServicesListBase: ActiveServicesItem ; ActiveServicesItem: TYPE = REF ActiveServicesItemObject; ActiveServicesPointer: TYPE = LONG POINTER TO ActiveServicesItemObject; StreamEOFState: TYPE = {true, pending, false}; ActiveServicesItemObject: TYPE = RECORD [ next: ActiveServicesItem, callbacksInterface: ComputeServerCallbacksRpcControl.InterfaceRecord _ NIL, userInterface: ComputeServerUserRpcControl.InterfaceRecord _ NIL, listenerPupAddress: PupDefs.PupAddress, startListenGMT: BasicTime.GMT, listener: PupListener, heardDoService: BOOL _ FALSE, debugItem: BOOL _ FALSE, debuggerInterface: ComputeServerDebuggerRpcControl.InterfaceRecord _ NIL, h: InterpreterToolPrivate.Handle _ NIL, originalListenerPupAddress: PupDefs.PupAddress _ [[0],[0],[0,0]], procHandle: RegisteredProcHandle, msg: ROPE _ NIL, success: ComputeServerClient.RemoteSuccess, remoteStream: IO.STREAM _ NIL, clientNetAddressRope: ROPE _ NIL, clientMachineName: ROPE _ NIL, packageEntry: PackageEntry, commandEntry: CmdEntry, inEOF: BOOL _ FALSE, outEOF: StreamEOFState _ false, doingEnumerate: BOOL _ FALSE, callOver: BOOL _ FALSE, pleaseAbort: BOOL _ FALSE ]; PupListener: TYPE = REF PupListenerObject; PupListenerObject: TYPE; BufStreamData: TYPE = REF BufStreamDataObject; BufStreamBufferSize: INT = 128; bufStreamState: TYPE = {true, pending, false}; BufStreamDataObject: TYPE = RECORD [ inPointer: NAT _ 0, outPointer: NAT _ 0, EOF: bufStreamState _ false, listenerItem: ActiveServicesItem, buffer: ARRAY [0..BufStreamBufferSize-1] OF CHAR _ ALL[' ] ]; CommandTable: SymTab.Ref; -- knowing a command, find the package/version MarkGuestProcess: PROC [process: PROCESS, data: LONG POINTER] RETURNS [ok: BOOL _ TRUE, oldData: LONG POINTER]; <> IsGuestProcess: PROC [] RETURNS [isGuest: BOOL] ; GetGuestProcessData: PROC [process: PROCESS] RETURNS [data: LONG POINTER]; MarkProcessNotGuest: PROC [process: PROCESS]; <> RemoveMarkProcessNotGuest: PROC [process: PROCESS]; <> MarkProcessUseLocalFS: PROC [process: PROCESS]; <> RemoveMarkProcessUseLocalFS: PROC [process: PROCESS]; <> AddPupAddress: PROC [serverPupAddress: PupDefs.PupAddress, procHandle: RegisteredProcHandle, listener: PupListener] RETURNS [newItem: ActiveServicesItem]; <> DeletePupAddress: PROC [serverPupAddress: PupDefs.PupAddress] RETURNS [found: BOOL]; <> MatchPupAddress: PROC [serverPupAddress: PupDefs.PupAddress, flagStarted: BOOL _ FALSE] RETURNS [found: BOOL, item: ActiveServicesItem]; <> GetClientInterfaceFromCache: PROC [clientInstance: RPC.ShortROPE, forceNewInterface: BOOL _ FALSE] RETURNS [clientInterface: ComputeServerCallbacksRpcControl.InterfaceRecord _ NIL]; DeleteClientInterfaceFromCache: PROC [clientInterface: ComputeServerCallbacksRpcControl.InterfaceRecord] RETURNS [gotIt: BOOL _ FALSE]; findDebuggerItemFromInterpreterHandle: PROC [h: InterpreterToolPrivate.Handle] RETURNS [found: BOOL, item: ActiveServicesItem _ NIL]; KillOldUnstartedServices: PROC; CreatePupByteStreamListener: PROC [ local: PupDefs.PupSocketID, proc: PROCEDURE [STREAM, PupDefs.PupAddress, PupListener, PupDefs.PupAddress], ticks: PupDefs.Tocks, filter: PROCEDURE [PupDefs.PupAddress]] RETURNS [PupListener]; DestroyPupListener: PROC [listener: PupListener]; ListenerProcess: PROC [stream: STREAM, connectionPupAddress: PupDefs.PupAddress, listener: PupListener, listenerPupAddress: PupDefs.PupAddress]; DontReject: PROCEDURE [PupDefs.PupAddress] ; inStreamProcs: REF IO.StreamProcs; outStreamProcs: REF IO.StreamProcs; inCharsAvail: PROC [self: STREAM, wait: BOOL] RETURNS [INT]; inBufGetChar: PROC [self: STREAM] RETURNS [ch: CHAR]; outBufPutChar: PROC [self: STREAM, char: CHAR]; ControllerInterface: ComputeServerControllerRpcControl.InterfaceRecord; ServiceEnabled: BOOL; SendStats: PROC [] RETURNS [success, terminateService, newPackage: BOOL, queueingCommands: LIST OF Rope.ROPE]; InitStats: PROC [myName: RPC.ShortROPE, myAddress: RPC.ShortROPE] ; InitCommands: PROC [remoteCommandDirectory, localCommandDirectory: Rope.ROPE] RETURNS [msg: Rope.ROPE _ NIL] ; getNewPackages: PROC; MyCatcher: RuntimeError.UCSProc; SummonerServerMonitor: PROC; ReportServerEvent: PROC [type: ComputeServerStatistics.ServerEventType, command: Rope.ROPE, startTime: BasicTime.GMT, endTime: BasicTime.GMT, remoteMachineName: Rope.ROPE]; END. <<>>