Browse Source

* Some procedure were forgotten. FIxed

marco 25 years ago
parent
commit
a9b37ce0e0
1 changed files with 54 additions and 4 deletions
  1. 54 4
      rtl/linux/bsdsysca.inc

+ 54 - 4
rtl/linux/bsdsysca.inc

@@ -28,13 +28,13 @@ Begin
  LinuxError:=ErrNo;
  LinuxError:=ErrNo;
 End;
 End;
 
 
-
+{
 function clone(func:TCloneFunc;sp:pointer;flags:longint;args:pointer):longint;
 function clone(func:TCloneFunc;sp:pointer;flags:longint;args:pointer):longint;
 {NOT IMPLEMENTED YET UNDER BSD}
 {NOT IMPLEMENTED YET UNDER BSD}
 begin
 begin
  HALT;
  HALT;
 END;
 END;
-{
+
   if (pointer(func)=nil) or (sp=nil) then
   if (pointer(func)=nil) or (sp=nil) then
    begin
    begin
      LinuxError:=Sys_EInval;
      LinuxError:=Sys_EInval;
@@ -90,6 +90,28 @@ Begin
  LinuxError:=ErrNo;
  LinuxError:=ErrNo;
 End;
 End;
 
 
+Function Umask(Mask:Integer):integer;
+{
+  Sets file creation mask to (Mask and 0777 (octal) ), and returns the
+  previous value.
+}
+begin
+ UMask:=Do_syscall(syscall_nr_umask,mask);
+ LinuxError:=0;
+end;
+
+Procedure Nice(N:integer);
+{
+  Set process priority. A positive N means a lower priority.
+  A negative N decreases priority.
+
+Doesn't exist in BSD. Linux emu uses setpriority in a construct as below:
+}
+
+begin
+  SetPriority(Prio_Process,0,N);
+end;
+
 Procedure Execve(path:pchar;args:ppchar;ep:ppchar);
 Procedure Execve(path:pchar;args:ppchar;ep:ppchar);
 {
 {
   Replaces the current program by the program specified in path,
   Replaces the current program by the program specified in path,
@@ -260,6 +282,16 @@ begin
  LinuxError:=Errno;
  LinuxError:=Errno;
 end;
 end;
 
 
+Function GetTimeOfDay: longint;
+{
+  Get the number of seconds since 00:00, January 1 1970, GMT
+  the time NOT corrected any way
+}
+begin
+  GetTimeOfDay:=Sys_time;
+  LinuxError:=Errno;
+end;
+
 Function fdTruncate(fd,size:longint):boolean;
 Function fdTruncate(fd,size:longint):boolean;
 
 
 begin
 begin
@@ -379,6 +411,7 @@ begin
  LinuxError:=Errno;
  LinuxError:=Errno;
 end;
 end;
 
 
+{
 Function SymLink(OldPath,newPath:pathstr):boolean;
 Function SymLink(OldPath,newPath:pathstr):boolean;
 {
 {
   Proceduces a soft link from new to old.
   Proceduces a soft link from new to old.
@@ -390,6 +423,7 @@ begin
   SymLink:=Do_Syscall(syscall_nr_symlink,longint(@oldpath[1]),longint(@newpath[1]))=0;
   SymLink:=Do_Syscall(syscall_nr_symlink,longint(@oldpath[1]),longint(@newpath[1]))=0;
   LinuxError:=Errno;
   LinuxError:=Errno;
 end;
 end;
+}
 
 
 Function Access(Path:Pathstr ;mode:longint):boolean;
 Function Access(Path:Pathstr ;mode:longint):boolean;
 {
 {
@@ -411,6 +445,17 @@ begin
  LinuxError:=Errno;
  LinuxError:=Errno;
 end;
 end;
 
 
+Function  Dup(oldfile:longint;var newfile:longint):Boolean;
+{
+  Copies the filedescriptor oldfile to newfile
+}
+
+begin
+ newfile:=Do_syscall(syscall_nr_dup,oldfile);
+ LinuxError:=Errno;
+ Dup:=(LinuxError=0);
+end;
+
 
 
 Function Dup2(oldfile,newfile:longint):Boolean;
 Function Dup2(oldfile,newfile:longint):Boolean;
 {
 {
@@ -555,7 +600,7 @@ Procedure SigSuspend(Mask:Sigset);
 }
 }
 
 
 begin
 begin
-  do_syscall(syscall_nr_sigsuspend,mask);
+  do_syscall(syscall_nr_sigsuspend,longint(@mask));
   LinuxError:=Errno;
   LinuxError:=Errno;
 end;
 end;
 
 
@@ -583,4 +628,9 @@ begin
  LinuxError:=Errno;
  LinuxError:=Errno;
 end;
 end;
 
 
-
+{
+  $Log$
+  Revision 1.2  2000-04-16 16:10:01  marco
+   * Some procedure were forgotten. FIxed
+
+}