From: PHO Date: Sun, 8 Aug 2010 10:55:19 +0000 (+0900) Subject: more bindings X-Git-Tag: RELEASE-0.1~29 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=e4706506c52d72c3533c6f098e48a87ac60f57f3;p=bindings-apr.git more bindings --- diff --git a/Bindings/APR/Allocator.hsc b/Bindings/APR/Allocator.hsc index 0ee0f97..236fff9 100644 --- a/Bindings/APR/Allocator.hsc +++ b/Bindings/APR/Allocator.hsc @@ -6,6 +6,7 @@ module Bindings.APR.Allocator where import Bindings.APR import Bindings.APR.Allocator.Types import Bindings.APR.Errno +import Bindings.APR.Thread.Mutex import Bindings.APR.Pools #num APR_MEMNODE_T_SIZE @@ -21,4 +22,5 @@ import Bindings.APR.Pools #ccall apr_allocator_max_free_set, Ptr -> -> IO () --- FIXME: incomplete \ No newline at end of file +#ccall apr_allocator_mutex_set, Ptr -> Ptr -> IO () +#ccall apr_allocator_mutex_get, Ptr -> IO (Ptr ) diff --git a/Bindings/APR/Thread/Mutex.hsc b/Bindings/APR/Thread/Mutex.hsc new file mode 100644 index 0000000..07c7ddd --- /dev/null +++ b/Bindings/APR/Thread/Mutex.hsc @@ -0,0 +1,21 @@ +#include +#include + +module Bindings.APR.Thread.Mutex where +#strict_import +import Bindings.APR.Errno +import Bindings.APR.Pools + +#opaque_t apr_thread_mutex_t + +#num APR_THREAD_MUTEX_DEFAULT +#num APR_THREAD_MUTEX_NESTED +#num APR_THREAD_MUTEX_UNNESTED + +#ccall apr_thread_mutex_create , Ptr -> CUInt -> Ptr -> IO +#ccall apr_thread_mutex_lock , Ptr -> IO +#ccall apr_thread_mutex_trylock, Ptr -> IO +#ccall apr_thread_mutex_unlock , Ptr -> IO +#ccall apr_thread_mutex_destroy, Ptr -> IO + +#ccall apr_thread_mutex_pool_get, Ptr -> IO (Ptr ) diff --git a/bindings-apr.cabal b/bindings-apr.cabal index af4b80e..4e70373 100644 --- a/bindings-apr.cabal +++ b/bindings-apr.cabal @@ -1,7 +1,7 @@ Name: bindings-apr Synopsis: Low level bindings to Apache Portable Runtime (APR) Description: - Bindings to APR: http://apr.apache.org/ + Bindings to APR: Version: 0.1 License: PublicDomain License-File: COPYING @@ -33,6 +33,7 @@ Library Bindings.APR.Allocator.Types Bindings.APR.Errno Bindings.APR.Pools + Bindings.APR.Thread.Mutex C-Sources: cbits/helper_apr_errno.c