blob: 2606af7330d517e169fa3978324accdea84d3d96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
diff -Nru oops-1.5.23.orig/src/lib/rwlock/rwlock.c oops-1.5.23/src/lib/rwlock/rwlock.c
--- oops-1.5.23.orig/src/lib/rwlock/rwlock.c 2000-11-29 19:03:35.000000000 +0200
+++ oops-1.5.23/src/lib/rwlock/rwlock.c 2006-09-06 00:30:36.000000000 +0300
@@ -53,6 +53,8 @@
#include <pthread.h>
#include "rwlock.h"
+#if defined(OOPS_IMPLEMENT_RWLOCK)
+
/* maximum number of times a read lock may be obtained */
#define MAX_READ_LOCKS (INT_MAX - 1)
@@ -375,4 +377,6 @@
return(0);
}
+#endif /* defined(OOPS_IMPLEMENT_RWLOCK) */
+
#endif /* _THREAD_SAFE || _PTHREADS || _REENTRANT */
diff -Nru oops-1.5.23.orig/src/lib/rwlock/rwlock.h oops-1.5.23/src/lib/rwlock/rwlock.h
--- oops-1.5.23.orig/src/lib/rwlock/rwlock.h 2003-10-06 17:15:40.000000000 +0300
+++ oops-1.5.23/src/lib/rwlock/rwlock.h 2006-09-06 00:29:46.000000000 +0300
@@ -53,6 +53,7 @@
#if !defined(PTHREAD_RWLOCK_INITIALIZER)
#define PTHREAD_RWLOCK_INITIALIZER NULL
+#define OOPS_IMPLEMENT_RWLOCK 1
struct pthread_rwlock {
pthread_mutex_t lock; /* monitor lock */
|