From: PHO Date: Sat, 21 Aug 2010 05:06:47 +0000 (+0900) Subject: Bindings.APR.Signal X-Git-Tag: RELEASE-0.1~13 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=5a3f4dada5c980672b04376467cc24aeb5654aff;p=bindings-apr.git Bindings.APR.Signal --- diff --git a/Bindings/APR/Signal.hsc b/Bindings/APR/Signal.hsc new file mode 100644 index 0000000..22bc231 --- /dev/null +++ b/Bindings/APR/Signal.hsc @@ -0,0 +1,17 @@ +#include +#include + +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 -> -> IO + +#ccall apr_signal_description_get, CInt -> IO (Ptr CChar) +#ccall apr_signal_init , Ptr -> IO () +#ccall apr_signal_block , CInt -> IO +#ccall apr_signal_unblock , CInt -> IO diff --git a/bindings-apr.cabal b/bindings-apr.cabal index 3d77c06..81059fc 100644 --- a/bindings-apr.cabal +++ b/bindings-apr.cabal @@ -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 index 0000000..2474132 --- /dev/null +++ b/cbits/helper_apr_signal.c @@ -0,0 +1,6 @@ +#include +#include + +void (*inline_apr_signal(int signo, void (*func)(int)))(int) { + return apr_signal(signo, func); +}