]> gitweb @ CieloNegro.org - bindings-apr-util.git/blob - Bindings/APR/AnyLock.hsc
initial revision
[bindings-apr-util.git] / Bindings / APR / AnyLock.hsc
1 #include <bindings.dsl.h>
2 #include <apr_anylock.h>
3
4 module Bindings.APR.AnyLock where
5 #strict_import
6 import Bindings.APR.ErrNo
7 import Bindings.APR.Proc.Mutex
8 import Bindings.APR.Thread.Mutex
9 import Bindings.APR.Thread.RWLock
10
11 #synonym_t tm_lock, CInt
12 #num apr_anylock_none
13 #num apr_anylock_procmutex
14 #num apr_anylock_readlock
15 #num apr_anylock_writelock
16
17 #starttype union apr_anylock_u_t
18 #  union_field pm, Ptr <apr_proc_mutex_t>
19 #  if APR_HAS_THREADS
20 #    union_field tm, Ptr <apr_thread_mutex_t>
21 #    union_field rw, Ptr <apr_thread_rwlock_t>
22 #  endif
23 #stoptype
24
25 #starttype struct apr_anylock_t
26 #field type, <tm_lock>
27 #field lock, <apr_anylock_u_t>
28 #stoptype
29
30 #cinline APR_ANYLOCK_LOCK   , Ptr <apr_anylock_t> -> IO <apr_status_t>
31 #cinline APR_ANYLOCK_TRYLOCK, Ptr <apr_anylock_t> -> IO <apr_status_t>
32 #cinline APR_ANYLOCK_UNLOCK , Ptr <apr_anylock_t> -> IO <apr_status_t>