mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:29:14 +02:00
add uses dos for OS_DOS
This commit is contained in:
parent
7377bbf1c9
commit
27880c29fd
@ -63,6 +63,10 @@ USES
|
|||||||
Windows, { Standard unit }
|
Windows, { Standard unit }
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$ifdef OS_DOS}
|
||||||
|
Dos,
|
||||||
|
{$endif OS_DOS}
|
||||||
|
|
||||||
{$IFDEF OS_OS2} { OS2 CODE }
|
{$IFDEF OS_OS2} { OS2 CODE }
|
||||||
{$IFDEF PPC_Virtual} { VIRTUAL PASCAL UNITS }
|
{$IFDEF PPC_Virtual} { VIRTUAL PASCAL UNITS }
|
||||||
OS2Def, OS2Base, OS2PMAPI, { Standard units }
|
OS2Def, OS2Base, OS2PMAPI, { Standard units }
|
||||||
@ -748,17 +752,15 @@ var
|
|||||||
|
|
||||||
|
|
||||||
procedure GiveUpTimeSlice;
|
procedure GiveUpTimeSlice;
|
||||||
{$ifdef GO32V2}{$define DOS}{$endif}
|
{$IFDEF OS_DOS}
|
||||||
{$ifdef TP}{$define DOS}{$endif}
|
|
||||||
{$ifdef DOS}
|
|
||||||
var r: registers;
|
var r: registers;
|
||||||
begin
|
begin
|
||||||
Intr ($28, R); (* This is supported everywhere. *)
|
Intr ($28, R); (* This is supported everywhere. *)
|
||||||
r.ax:=$1680;
|
r.ax:=$1680;
|
||||||
intr($2f,r);
|
intr($2f,r);
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$ENDIF}
|
||||||
{$ifdef Unix}
|
{$IFDEF OS_UNIX}
|
||||||
var
|
var
|
||||||
req,rem : timespec;
|
req,rem : timespec;
|
||||||
begin
|
begin
|
||||||
@ -766,13 +768,13 @@ begin
|
|||||||
req.tv_nsec:=10000000;{ 10 ms }
|
req.tv_nsec:=10000000;{ 10 ms }
|
||||||
{$ifdef ver1_0}nanosleep(req,rem){$else}fpnanosleep(@req,@rem){$endif};
|
{$ifdef ver1_0}nanosleep(req,rem){$else}fpnanosleep(@req,@rem){$endif};
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$ENDIF}
|
||||||
{$IFDEF OS2}
|
{$IFDEF OS_OS2}
|
||||||
begin
|
begin
|
||||||
DosSleep (5);
|
DosSleep (5);
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ifdef Win32}
|
{$IFDEF OS_WINDOWS}
|
||||||
begin
|
begin
|
||||||
{ if the return value of this call is non zero then
|
{ if the return value of this call is non zero then
|
||||||
it means that a ReadFileEx or WriteFileEx have completed
|
it means that a ReadFileEx or WriteFileEx have completed
|
||||||
@ -784,14 +786,17 @@ begin
|
|||||||
if we use them }
|
if we use them }
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$ENDIF}
|
||||||
{$undef DOS}
|
{$IFDEF OS_NETWARE_LIBC}
|
||||||
{$ifdef netwlibc} {$define netware} {$endif}
|
begin
|
||||||
{$ifdef netware}
|
|
||||||
begin
|
|
||||||
Delay (10);
|
Delay (10);
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$ENDIF}
|
||||||
|
{$IFDEF OS_NETWARE_CLIB}
|
||||||
|
begin
|
||||||
|
Delay (10);
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
|
||||||
{---------------------------------------------------------------------------}
|
{---------------------------------------------------------------------------}
|
||||||
@ -1528,7 +1533,10 @@ BEGIN
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.50 2004-12-22 15:27:30 peter
|
Revision 1.51 2004-12-23 16:19:57 peter
|
||||||
|
add uses dos for OS_DOS
|
||||||
|
|
||||||
|
Revision 1.50 2004/12/22 15:27:30 peter
|
||||||
* call giveuptimeslice to prevent busy loop with idle
|
* call giveuptimeslice to prevent busy loop with idle
|
||||||
|
|
||||||
Revision 1.49 2004/12/18 16:18:47 peter
|
Revision 1.49 2004/12/18 16:18:47 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user