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
#ccall apr_allocator_max_free_set, Ptr <apr_allocator_t> -> <apr_size_t> -> IO ()
--- FIXME: incomplete
\ No newline at end of file
+#ccall apr_allocator_mutex_set, Ptr <apr_allocator_t> -> Ptr <apr_thread_mutex_t> -> IO ()
+#ccall apr_allocator_mutex_get, Ptr <apr_allocator_t> -> IO (Ptr <apr_thread_mutex_t>)
--- /dev/null
+#include <bindings.dsl.h>
+#include <apr_thread_mutex.h>
+
+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 <apr_thread_mutex_t> -> CUInt -> Ptr <apr_pool_t> -> IO <apr_status_t>
+#ccall apr_thread_mutex_lock , Ptr <apr_thread_mutex_t> -> IO <apr_status_t>
+#ccall apr_thread_mutex_trylock, Ptr <apr_thread_mutex_t> -> IO <apr_status_t>
+#ccall apr_thread_mutex_unlock , Ptr <apr_thread_mutex_t> -> IO <apr_status_t>
+#ccall apr_thread_mutex_destroy, Ptr <apr_thread_mutex_t> -> IO <apr_status_t>
+
+#ccall apr_thread_mutex_pool_get, Ptr <apr_thread_mutex_t> -> IO (Ptr <apr_pool_t>)
Name: bindings-apr
Synopsis: Low level bindings to Apache Portable Runtime (APR)
Description:
- Bindings to APR: http://apr.apache.org/
+ Bindings to APR: <http://apr.apache.org/>
Version: 0.1
License: PublicDomain
License-File: COPYING
Bindings.APR.Allocator.Types
Bindings.APR.Errno
Bindings.APR.Pools
+ Bindings.APR.Thread.Mutex
C-Sources:
cbits/helper_apr_errno.c