mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-29 22:22:38 +02:00
* move fdatasync to linux unit
git-svn-id: trunk@12109 -
This commit is contained in:
parent
2a1fc6723a
commit
28e614c237
@ -106,6 +106,10 @@ function futex_op(op, oparg, cmp, cmparg: cint): cint; {$ifdef SYSTEMINLINE}inli
|
||||
{$endif}
|
||||
|
||||
const
|
||||
POLLMSG = $0400;
|
||||
POLLREMOVE = $1000;
|
||||
POLLRDHUP = $2000;
|
||||
|
||||
EPOLLIN = $01; { The associated file is available for read(2) operations. }
|
||||
EPOLLPRI = $02; { There is urgent data available for read(2) operations. }
|
||||
EPOLLOUT = $04; { The associated file is available for write(2) operations. }
|
||||
@ -326,6 +330,7 @@ const
|
||||
SYNC_FILE_RANGE_WAIT_AFTER = 4;
|
||||
|
||||
function sync_file_range(fd: cInt; offset, nbytes: off64_t; flags: cuInt): cInt; {$ifdef FPC_USE_LIBC} cdecl; external name 'sync_file_range'; {$ENDIF}
|
||||
function fdatasync (fd: cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'sync_file_range'; {$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
@ -487,6 +492,11 @@ begin
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
function fdatasync (fd: cint): cint;
|
||||
begin
|
||||
fpfdatasync:=do_SysCall(syscall_nr_fdatasync, fd);
|
||||
end;
|
||||
|
||||
{$endif} // non-libc
|
||||
|
||||
{ FUTEX_OP is a macro, doesn't exist in libC as function}
|
||||
|
@ -29,11 +29,6 @@ begin
|
||||
fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info))
|
||||
end;
|
||||
|
||||
Function fpfdatasync (fd : cint) : cint;
|
||||
begin
|
||||
fpfdatasync:=do_SysCall(syscall_nr_fdatasync, fd);
|
||||
end;
|
||||
|
||||
Function fpfsync (fd : cint) : cint;
|
||||
|
||||
begin
|
||||
|
@ -18,7 +18,6 @@ function fpgettimeofday(tp: ptimeval;tzp:ptimezone):cint; external name 'FPC_SYS
|
||||
function fpfStatFS (Fd: cint; Info:pstatfs):cint;
|
||||
function fpStatFS (Path:pchar; Info:pstatfs):cint;
|
||||
function fpfsync (fd : cint) : cint;
|
||||
function fpfdatasync (fd : cint) : cint;
|
||||
Function fpFlock (fd,mode : cint) : cint ;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user