* Merging revisions r44666 from trunk:

------------------------------------------------------------------------
    r44666 | michael | 2020-04-09 23:27:22 +0200 (Thu, 09 Apr 2020) | 1 line
    
    * Fix bug #35914: add epoll_pwait, epoll_create1
    ------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@46567 -
This commit is contained in:
michael 2020-08-23 09:07:28 +00:00
parent 64454cfb57
commit 61ae4eea1f

View File

@ -282,10 +282,14 @@ type
{ open an epoll file descriptor }
function epoll_create(size: cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'epoll_create'; {$endif}
function epoll_create1(flags: cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'epoll_create1'; {$endif}
{ control interface for an epoll descriptor }
function epoll_ctl(epfd, op, fd: cint; event: pepoll_event): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'epoll_ctl'; {$endif}
{ wait for an I/O event on an epoll file descriptor }
function epoll_wait(epfd: cint; events: pepoll_event; maxevents, timeout: cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'epoll_wait'; {$endif}
function epoll_pwait(epfd: cint; events: pepoll_event; maxevents, timeout: cint; sigmask: PSigSet): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'epoll_pwait'; {$endif}
type Puser_cap_header=^user_cap_header;
user_cap_header=record
@ -563,6 +567,17 @@ begin
{$endif}
end;
function epoll_create1(flags: cint): cint;
begin
epoll_create1 := do_syscall(syscall_nr_epoll_create1, tsysparam(flags));
end;
function epoll_pwait(epfd: cint; events: pepoll_event; maxevents, timeout: cint; sigmask: PSigSet): cint;
begin
epoll_pwait := do_syscall(syscall_nr_epoll_pwait, tsysparam(epfd),
tsysparam(events), tsysparam(maxevents), tsysparam(timeout), tsysparam(sigmask));
end;
function capget(header:Puser_cap_header;data:Puser_cap_data):cint;
begin