47 #ifndef ACL_PTHREAD_RWLOCK_H 48 #define ACL_PTHREAD_RWLOCK_H 50 #include "../stdlib/acl_define.h" 51 #include "../thread/acl_pthread.h" 52 #if defined(_WIN32) || defined(_WIN64) 53 # define ACL_HAVE_NO_RWLOCK 56 #ifdef ACL_HAVE_NO_RWLOCK 58 #if !defined(ACL_PTHREAD_PROCESS_PRIVATE) 59 #define ACL_PTHREAD_PROCESS_PRIVATE 0 61 #if !defined(ACL_PTHREAD_PROCESS_SHARED) 62 #define ACL_PTHREAD_PROCESS_SHARED 1 65 #if !defined(ACL_PTHREAD_RWLOCK_INITIALIZER) 66 #define ACL_PTHREAD_RWLOCK_INITIALIZER NULL 68 struct acl_pthread_rwlock {
76 struct acl_pthread_rwlockattr {
80 typedef struct acl_pthread_rwlock *acl_pthread_rwlock_t;
81 typedef struct acl_pthread_rwlockattr *acl_pthread_rwlockattr_t;
83 #if defined(__cplusplus) 87 ACL_API
int acl_pthread_rwlock_destroy(acl_pthread_rwlock_t *);
88 ACL_API
int acl_pthread_rwlock_init(acl_pthread_rwlock_t *,
89 const acl_pthread_rwlockattr_t *);
90 ACL_API
int acl_pthread_rwlock_rdlock(acl_pthread_rwlock_t *);
91 ACL_API
int acl_pthread_rwlock_tryrdlock(acl_pthread_rwlock_t *);
92 ACL_API
int acl_pthread_rwlock_trywrlock(acl_pthread_rwlock_t *);
93 ACL_API
int acl_pthread_rwlock_unlock(acl_pthread_rwlock_t *);
94 ACL_API
int acl_pthread_rwlock_wrlock(acl_pthread_rwlock_t *);
95 ACL_API
int acl_pthread_rwlockattr_init(acl_pthread_rwlockattr_t *);
96 ACL_API
int acl_pthread_rwlockattr_getpshared(
const acl_pthread_rwlockattr_t *,
int *);
97 ACL_API
int acl_pthread_rwlockattr_setpshared(acl_pthread_rwlockattr_t *,
int);
98 ACL_API
int acl_pthread_rwlockattr_destroy(acl_pthread_rwlockattr_t *);
100 #if defined(__cplusplus)