* avoid need of GetLastOSError under OS/2

git-svn-id: trunk@22983 -
This commit is contained in:
Tomas Hajny 2012-11-12 19:59:28 +00:00
parent cb41d6355c
commit 688c0a6f3c

View File

@ -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;