mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 21:19:31 +02:00
* avoid need of GetLastOSError under OS/2
git-svn-id: trunk@22983 -
This commit is contained in:
parent
cb41d6355c
commit
688c0a6f3c
@ -83,6 +83,15 @@ implementation
|
||||
Real syncobjs implementation
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$IFDEF OS2}
|
||||
type
|
||||
TBasicEventState = record
|
||||
FHandle: THandle;
|
||||
FLastError: longint;
|
||||
end;
|
||||
PLocalEventRec = ^TBasicEventState;
|
||||
{$ENDIF OS2}
|
||||
|
||||
procedure TSynchroObject.Acquire;
|
||||
begin
|
||||
end;
|
||||
@ -168,7 +177,11 @@ function TEventObject.WaitFor(Timeout : Cardinal) : TWaitResult;
|
||||
begin
|
||||
Result := TWaitResult(basiceventWaitFor(Timeout, Handle));
|
||||
if Result = wrError then
|
||||
{$IFDEF OS2}
|
||||
FLastError := PLocalEventRec (Handle)^.FLastError;
|
||||
{$ELSE OS2}
|
||||
FLastError := GetLastOSError;
|
||||
{$ENDIF OS2}
|
||||
end;
|
||||
|
||||
constructor TSimpleEvent.Create;
|
||||
|
Loading…
Reference in New Issue
Block a user