From: Kern Sibbald Date: Wed, 5 Nov 2008 11:15:23 +0000 (+0000) Subject: Tweak rwlock_test X-Git-Tag: Release-2.4.4~38 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bb052bedb44496c31931d93eff5fe44164f002f7;p=bacula%2Fbacula Tweak rwlock_test git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7977 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patchnotes-2.4 b/bacula/patchnotes-2.4 index 1f251181bc..0a3b0c6f46 100644 --- a/bacula/patchnotes-2.4 +++ b/bacula/patchnotes-2.4 @@ -14,6 +14,9 @@ Patches Committed: 2.4.3-win32-runscript-unicode-path.patch Patches being Tested: +03Nov08 +2.4.3-getmsg.patch +kes Patch to use BSOCK jcr rather than searching for it. 02Nov08 2.4.3-orphaned-jobs.patch kes This patch fixes a case of orphaned jobs (and possible deadlock) diff --git a/bacula/src/lib/Makefile.in b/bacula/src/lib/Makefile.in index 0e53207d73..92a6a521e1 100644 --- a/bacula/src/lib/Makefile.in +++ b/bacula/src/lib/Makefile.in @@ -82,10 +82,10 @@ pythonlib.o: pythonlib.c @echo "Compiling $<" $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(python) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $< -rwlock_test: +rwlock_test: rwlock.c rm -f rwlock.o $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c - $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac -lm + $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm rm -f rwlock.o $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c diff --git a/bacula/src/lib/rwlock.c b/bacula/src/lib/rwlock.c index e78216cf68..561a80e734 100644 --- a/bacula/src/lib/rwlock.c +++ b/bacula/src/lib/rwlock.c @@ -318,9 +318,9 @@ int rwl_writeunlock(brwlock_t *rwl) #ifdef TEST_RWLOCK -#define THREADS 5 +#define THREADS 80 #define DATASIZE 15 -#define ITERATIONS 10000 +#define ITERATIONS 1000000 /* * Keep statics for each thread. @@ -342,8 +342,8 @@ typedef struct data_tag { int writes; } data_t; -thread_t threads[THREADS]; -data_t data[DATASIZE]; +static thread_t threads[THREADS]; +static data_t data[DATASIZE]; /* * Thread start routine that uses read/write locks.