Add an experiment to verify the binding of epoll_create(2)
This commit is contained in:
parent
96417981f6
commit
9495536c63
Binary file not shown.
|
@ -0,0 +1,23 @@
|
|||
|
||||
with Ada.Text_IO;
|
||||
with Interfaces.C;
|
||||
with Epoll;
|
||||
|
||||
use Ada.Text_IO;
|
||||
use Interfaces;
|
||||
|
||||
procedure Epoll_Create is
|
||||
Max_Size : C.int := 10;
|
||||
begin
|
||||
Put_Line (">> Start");
|
||||
|
||||
declare
|
||||
use Interfaces.C;
|
||||
RC : C.int := Epoll.Epoll_Create (Max_Size);
|
||||
begin
|
||||
Put_Line ("Epoll_Create returned: " & C.int'Image (RC));
|
||||
if RC = -1 then
|
||||
Put_Line (".. it appears that Epoll_Create encountered an error");
|
||||
end if;
|
||||
end;
|
||||
end Epoll_Create;
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
project Epoll_Create is
|
||||
for Source_Dirs use ("../../src", ".");
|
||||
for Main use ("epoll_create.adb");
|
||||
for Object_Dir use "build";
|
||||
for Exec_Dir use ".";
|
||||
|
||||
package Compiler is
|
||||
for Default_Switches("ada") use
|
||||
("-O2", "-gnat05");
|
||||
end Compiler;
|
||||
end Epoll_Create;
|
||||
|
Loading…
Reference in New Issue