mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 04:29:20 +02:00
+ Some improvements for the Linux version
This commit is contained in:
parent
70f3a0c08e
commit
4e7f8ce823
@ -22,10 +22,8 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TCriticalSection = class(TSyncroObject)
|
TCriticalSection = class(TSyncroObject)
|
||||||
{$ifdef win32}
|
|
||||||
private
|
private
|
||||||
CriticalSection : TRTLCriticalSection;
|
CriticalSection : TRTLCriticalSection;
|
||||||
{$endif win32}
|
|
||||||
public
|
public
|
||||||
procedure Acquire;override;
|
procedure Acquire;override;
|
||||||
procedure Release;override;
|
procedure Release;override;
|
||||||
@ -46,12 +44,18 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TEventObject = class(THandleObject)
|
TEventObject = class(THandleObject)
|
||||||
|
private
|
||||||
|
FSem: Pointer;
|
||||||
|
FManualReset: Boolean;
|
||||||
|
FEventSection: TCriticalSection;
|
||||||
public
|
public
|
||||||
constructor Create(EventAttributes : PSecurityAttributes;
|
constructor Create(EventAttributes : PSecurityAttributes;
|
||||||
ManualReset,InitialState : Boolean;const Name : string);
|
AManualReset,InitialState : Boolean;const Name : string);
|
||||||
|
destructor destroy; override;
|
||||||
procedure ResetEvent;
|
procedure ResetEvent;
|
||||||
procedure SetEvent;
|
procedure SetEvent;
|
||||||
function WaitFor(Timeout : Cardinal) : TWaitResult;
|
function WaitFor(Timeout : Cardinal) : TWaitResult;
|
||||||
|
Property ManualReset : Boolean read FManualReset;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TEvent = TEventObject;
|
TEvent = TEventObject;
|
||||||
@ -62,7 +66,10 @@ type
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
+ Implemented Win32 of syncobjs
|
||||||
|
|
||||||
Revision 1.4 2002/09/07 15:15:26 peter
|
Revision 1.4 2002/09/07 15:15:26 peter
|
||||||
|
@ -72,6 +72,12 @@ begin
|
|||||||
FHandle := CreateEvent(EventAttributes, ManualReset, InitialState, PChar(Name));
|
FHandle := CreateEvent(EventAttributes, ManualReset, InitialState, PChar(Name));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
destructor TEventObject.destroy;
|
||||||
|
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TEventObject.ResetEvent;
|
procedure TEventObject.ResetEvent;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -111,7 +117,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
+ Implemented Win32 of syncobjs
|
||||||
|
|
||||||
Revision 1.3 2002/09/07 15:15:29 peter
|
Revision 1.3 2002/09/07 15:15:29 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user