瀏覽代碼

+ Some improvements for the Linux version

michael 22 年之前
父節點
當前提交
4e7f8ce823
共有 2 個文件被更改,包括 21 次插入5 次删除
  1. 11 4
      fcl/inc/syncobh.inc
  2. 10 1
      fcl/win32/syncobjs.pp

+ 11 - 4
fcl/inc/syncobh.inc

@@ -22,10 +22,8 @@ type
    end;
 
    TCriticalSection = class(TSyncroObject)
-{$ifdef win32}
    private
       CriticalSection : TRTLCriticalSection;
-{$endif win32}
    public
       procedure Acquire;override;
       procedure Release;override;
@@ -46,12 +44,18 @@ type
    end;
 
    TEventObject = class(THandleObject)
+   private
+      FSem: Pointer;
+      FManualReset: Boolean;
+      FEventSection: TCriticalSection;
    public
       constructor Create(EventAttributes : PSecurityAttributes;
-        ManualReset,InitialState : Boolean;const Name : string);
+        AManualReset,InitialState : Boolean;const Name : string);
+      destructor destroy; override;  
       procedure ResetEvent;
       procedure SetEvent;
       function WaitFor(Timeout : Cardinal) : TWaitResult;
+      Property ManualReset : Boolean read FManualReset;
    end;
    
    TEvent = TEventObject;
@@ -62,7 +66,10 @@ type
 
 {
   $Log$
-  Revision 1.5  2003-06-11 12:00:09  michael
+  Revision 1.6  2003-06-14 19:14:58  michael
+  + Some improvements for the Linux version
+
+  Revision 1.5  2003/06/11 12:00:09  michael
   + Implemented Win32 of syncobjs
 
   Revision 1.4  2002/09/07 15:15:26  peter

+ 10 - 1
fcl/win32/syncobjs.pp

@@ -72,6 +72,12 @@ begin
   FHandle := CreateEvent(EventAttributes, ManualReset, InitialState, PChar(Name));
 end;
 
+destructor TEventObject.destroy;
+
+begin
+  inherited;
+end;
+
 procedure TEventObject.ResetEvent;
 
 begin
@@ -111,7 +117,10 @@ end.
 
 {
   $Log$
-  Revision 1.4  2003-06-11 11:59:52  michael
+  Revision 1.5  2003-06-14 19:16:50  michael
+  + Some improvements for the Linux version
+
+  Revision 1.4  2003/06/11 11:59:52  michael
   + Implemented Win32 of syncobjs
 
   Revision 1.3  2002/09/07 15:15:29  peter