Browse Source

* 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 -

michael 4 years ago
parent
commit
61ae4eea1f
1 changed files with 15 additions and 0 deletions
  1. 15 0
      rtl/linux/linux.pp

+ 15 - 0
rtl/linux/linux.pp

@@ -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