]> gitweb @ CieloNegro.org - bindings-apr.git/commitdiff
Bindings.APR.Signal
authorPHO <pho@cielonegro.org>
Sat, 21 Aug 2010 05:06:47 +0000 (14:06 +0900)
committerPHO <pho@cielonegro.org>
Sat, 21 Aug 2010 05:06:47 +0000 (14:06 +0900)
Bindings/APR/Signal.hsc [new file with mode: 0644]
bindings-apr.cabal
cbits/helper_apr_signal.c [new file with mode: 0644]

diff --git a/Bindings/APR/Signal.hsc b/Bindings/APR/Signal.hsc
new file mode 100644 (file)
index 0000000..22bc231
--- /dev/null
@@ -0,0 +1,17 @@
+#include <bindings.dsl.h>
+#include <apr_shm.h>
+
+module Bindings.APR.Signal where
+#strict_import
+import Bindings.APR
+import Bindings.APR.ErrNo
+import Bindings.APR.Pools
+
+#callback apr_sigfunc_t, CInt -> IO ()
+
+#cinline apr_signal, CInt -> <apr_sigfunc_t> -> IO <apr_sigfunc_t>
+
+#ccall apr_signal_description_get, CInt -> IO (Ptr CChar)
+#ccall apr_signal_init           , Ptr <apr_pool_t> -> IO ()
+#ccall apr_signal_block          , CInt -> IO <apr_status_t>
+#ccall apr_signal_unblock        , CInt -> IO <apr_status_t>
index 3d77c06fc23899f515f103fa93a2d89123556ad6..81059fc3dacc48ba1cd40879b678e81a4c636870 100644 (file)
@@ -53,6 +53,7 @@ Library
         Bindings.APR.Proc.Mutex
         Bindings.APR.Random
         Bindings.APR.Shm
+        Bindings.APR.Signal
         Bindings.APR.Tables
         Bindings.APR.Thread.Mutex
         Bindings.APR.Thread.Proc
@@ -68,6 +69,7 @@ Library
         cbits/helper_apr_pools.c
         cbits/helper_apr_lib.c
         cbits/helper_apr_mmap.c
+        cbits/helper_apr_signal.c
         cbits/helper_apr_time.c
         cbits/helper_apr_thread_proc.c
         cbits/helper_apr_user.c
diff --git a/cbits/helper_apr_signal.c b/cbits/helper_apr_signal.c
new file mode 100644 (file)
index 0000000..2474132
--- /dev/null
@@ -0,0 +1,6 @@
+#include <bindings.cmacros.h>
+#include <apr_signal.h>
+
+void (*inline_apr_signal(int signo, void (*func)(int)))(int) {
+    return apr_signal(signo, func);
+}