* nano sleep (merged)

This commit is contained in:
peter 2000-10-26 22:51:12 +00:00
parent c53066252b
commit 19165e8110
3 changed files with 77 additions and 48 deletions

View File

@ -592,6 +592,12 @@ begin
end;
Function NanoSleep(const req : timespec;var rem : timespec) : longint;
begin
NanoSleep:=Do_SysCall(syscall_nr_nanosleep,longint(@req),longint(@rem));
LinuxError:=Errno;
end;
Function IOCtl(Handle,Ndx: Longint;Data: Pointer):boolean;
{
@ -632,7 +638,7 @@ begin
FillChar(sa.sa_mask,sizeof(sigset),#0);
sa.sa_flags := 0;
{ if (sigintr and signum) =0 then {restart behaviour needs libc}
sa.sa_flags :=sa.sa_flags or SA_RESTART; }
sa.sa_flags :=sa.sa_flags or SA_RESTART;}
sigaction(signum,@sa,@osa);
if ErrNo<>0 then
signal:=NIL
@ -677,7 +683,10 @@ end;
{
$Log$
Revision 1.2 2000-09-18 13:14:50 marco
Revision 1.3 2000-10-26 22:51:12 peter
* nano sleep (merged)
Revision 1.2 2000/09/18 13:14:50 marco
* Global Linux +bsd to (rtl/freebsd rtl/unix rtl/linux structure)
Revision 1.3 2000/09/11 14:05:31 marco

View File

@ -845,6 +845,16 @@ begin
syscall(syscall_nr_pause,sr);
end;
Function NanoSleep(const req : timespec;var rem : timespec) : longint;
var Sr : Syscallregs;
begin
sr.reg2:=longint(@req);
sr.reg3:=longint(@rem);
NanoSleep:=Syscall(syscall_nr_nanosleep,sr);
LinuxError:=Errno;
end;
Function IOCtl(Handle,Ndx: Longint;Data: Pointer):boolean;
{
@ -1174,7 +1184,10 @@ end;
{
$Log$
Revision 1.3 2000-10-02 17:57:37 peter
Revision 1.4 2000-10-26 22:51:12 peter
* nano sleep (merged)
Revision 1.3 2000/10/02 17:57:37 peter
* removed warning (merged)
Revision 1.2 2000/09/18 13:14:50 marco

View File

@ -33,7 +33,8 @@ var
{********************
Process
********************}
const {Checked for BSD using Linuxthreads port}
const
{Checked for BSD using Linuxthreads port}
{ cloning flags }
CSIGNAL = $000000ff; // signal mask to be sent at exit
CLONE_VM = $00000100; // set if VM shared between processes
@ -104,6 +105,12 @@ const
F_GetOwn = 8;
F_SetOwn = 9;
{********************
IOCtl(TermIOS)
********************}
{Is too freebsd/Linux specific}
{$I termios.inc}
{********************
@ -344,6 +351,7 @@ Procedure SigRaise(Sig:integer);
Function Alarm(Sec : Longint) : longint;
Procedure Pause;
{$endif}
Function NanoSleep(const req : timespec;var rem : timespec) : longint;
{**************************
IOCtl/Termios Functions
@ -1789,8 +1797,6 @@ end;
******************************************************************************}
Function TCGetAttr(fd:longint;var tios:TermIOS):boolean;
begin
{$ifndef BSD}
@ -1881,7 +1887,6 @@ begin
end;
Function TCSendBreak(fd,duration:longint):boolean;
begin
{$ifndef BSD}
@ -2603,7 +2608,10 @@ End.
{
$Log$
Revision 1.4 2000-10-11 13:59:16 marco
Revision 1.5 2000-10-26 22:51:12 peter
* nano sleep (merged)
Revision 1.4 2000/10/11 13:59:16 marco
* FreeBSD TermIOS support and minor changes to some related files.
Revision 1.3 2000/10/10 12:02:35 marco
@ -2619,7 +2627,6 @@ End.
Revision 1.6 2000/09/11 14:05:31 marco
* FreeBSD support and removed old signalhandling
Revision 1.5 2000/09/06 20:47:34 peter
* removed previous fsplit() patch as it's not the correct behaviour for
LFNs. The code showing the bug could easily be adapted (merged)