ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/nongui/sv5ipc.inc
(Generate patch)

Comparing ibx/trunk/runtime/nongui/sv5ipc.inc (file contents):
Revision 320 by tony, Thu Feb 25 12:07:54 2021 UTC vs.
Revision 321 by tony, Thu Feb 25 12:10:07 2021 UTC

# Line 69 | Line 69 | type
69      Note that the Linux semaphore set is also created with the shared memory.
70    }
71  
72 <  ISharedMemoryExt = interface(ISharedMemory)
73 <  ['{7449e122-61c0-4ea9-acf4-f0a420af14aa}']
72 >  ISharedMemory = interface
73 >  ['{db77bdd4-233a-4c9c-9212-dd7945e2e57c}']
74    function IsInitialiser: boolean;
75 +  function Allocate(Size: integer): PByte;
76 +  function GetLastAllocationSize: integer;
77 +  property LastAllocationSize: integer read GetLastAllocationSize;
78    end;
79  
80    TSharedMemory = class(TIpcCommon,ISharedMemory)
# Line 139 | Line 142 | type
142  
143    TSingleLockGate = class(TIpcCommon,ISingleLockGate)
144    private
145 <    FSharedMemory: ISharedMemoryExt;
145 >    FSharedMemory: ISharedMemory;
146      FSemaphore: cint;
147      FMutex: cint;
148      FSignalledState: PInteger;
149      FWaitingThreads: PInteger;
150      function GetWaitingThreads: integer;
151    public
152 <    constructor Create(SemNum: cint; sm: ISharedMemoryExt);
152 >    constructor Create(SemNum: cint; sm: ISharedMemory);
153      property WaitingThreads: integer read GetWaitingThreads;
154    public
155      procedure PassthroughGate;
# Line 192 | Line 195 | type
195  
196    TMultilockGate = class(TIpcCommon,IMultiLockGate)
197    private
198 <    FSharedMemory: ISharedMemoryExt;
198 >    FSharedMemory: ISharedMemory;
199      FOnGateTimeout: TNotifyEvent;
200      FSemaphore: cint;
201      FMutex: cint;
202      FLockCount: PInteger;
203      function GetLockCount: integer;
204    public
205 <    constructor Create(SemNum: cint; sm: ISharedMemoryExt);
205 >    constructor Create(SemNum: cint; sm: ISharedMemory);
206      procedure Lock;
207      procedure Unlock;
208      procedure PassthroughGate;
# Line 214 | Line 217 | type
217    TIPCInterface = class(TIpcCommon,IIPCInterface)
218    private
219      FMaxBufferSize: integer;
220 <    FSharedMemory: ISharedMemoryExt;
220 >    FSharedMemory: ISharedMemory;
221      FWriteLock: IMutex;
222      FBuffer: PByte;
223      FTraceDataType,
# Line 237 | Line 240 | type
240      function GetReadFinishedEvent: IMultiLockGate;
241      function GetWriteLock: IMutex;
242      function GetMonitorCount: integer;
240    function GetSharedMemory: ISharedMemory;
243      function GetMaxBufferSize: integer;
244      property DataAvailableEvent: ISingleLockGate read GetDataAvailableEvent;
245      property WriterBusyEvent: ISingleLockGate read GetWriterBusyEvent;
# Line 245 | Line 247 | type
247      property ReadFinishedEvent: IMultiLockGate read GetReadFinishedEvent;
248      property WriteLock: IMutex read GetWriteLock;
249      property MonitorCount: integer read GetMonitorCount;
248    property SharedMemory: ISharedMemory read GetSharedMemory;
250      property MaxBufferSize: integer read GetMaxBufferSize;
251    end;
252  
# Line 470 | Line 471 | begin
471    Result := FWaitingThreads^
472   end;
473  
474 < constructor TSingleLockGate.Create(SemNum: cint; sm: ISharedMemoryExt);
474 > constructor TSingleLockGate.Create(SemNum: cint; sm: ISharedMemory);
475   begin
476    inherited Create;
477    FSharedMemory := sm;
# Line 525 | Line 526 | end;
526  
527   { TMultilockGate }
528  
529 < constructor TMultilockGate.Create(SemNum: cint; sm: ISharedMemoryExt);
529 > constructor TMultilockGate.Create(SemNum: cint; sm: ISharedMemory);
530   begin
531    inherited Create;
532    FSemaphore := SemNum;
# Line 608 | Line 609 | begin
609    Result := GetSemValue(cMonitorCounter)
610   end;
611  
611 function TIPCInterface.GetSharedMemory: ISharedMemory;
612 begin
613  Result := FSharedMemory;
614 end;
615
612   function TIPCInterface.GetMaxBufferSize: integer;
613   begin
614    Result := FMaxBufferSize;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines