From 9adf01e2c101f378e99b1fb65cc636af368ec31b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Mon, 4 Sep 2006 09:28:00 +0000 Subject: [PATCH] Added threaded/non-threaded flavor to the connection pool. --- org.glite.lb.client/Makefile | 2 +- org.glite.lb.common/Makefile | 2 +- org.glite.lb.common/src/context.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/org.glite.lb.client/Makefile b/org.glite.lb.client/Makefile index 6acead6..ba29ed7 100644 --- a/org.glite.lb.client/Makefile +++ b/org.glite.lb.client/Makefile @@ -151,7 +151,7 @@ THRPLUSLIB:=libglite_lb_clientpp_${thrflavour}.la TOOLS:=dump load purge lb_dump_exporter ${LB_PERF_TOOLS} EXAMPLES:=log_usertag_proxy job_log job_reg feed_shark notify query_ext query_seq_code stats abort_job change_acl stresslog -EXAMPLES_CL=user_jobs job_status +EXAMPLES_CL=user_jobs job_status user_jobs_threaded FAKE_EXAMPLES:=job_log_fake MAN_GZ:=glite-lb-logevent.1.gz diff --git a/org.glite.lb.common/Makefile b/org.glite.lb.common/Makefile index 6d960c5..842592a 100644 --- a/org.glite.lb.common/Makefile +++ b/org.glite.lb.common/Makefile @@ -247,7 +247,7 @@ il_int_test.o il_string_test.o il_test.o il_msg_test.o: %.o: %.cpp ${CXX} -c ${CFLAGS} ${TEST_INC} $< %.thr.o: %.c - ${COMPILE} ${GLOBUSTHRINC} ${CFLAGS} -o $@ -c $< + ${COMPILE} ${GLOBUSTHRINC} ${CFLAGS} -D_REENTRANT -DGLITE_LB_THREADED -o $@ -c $< %.h: %.h.T rm -f $@ diff --git a/org.glite.lb.common/src/context.c b/org.glite.lb.common/src/context.c index 36c4d79..b025b4c 100644 --- a/org.glite.lb.common/src/context.c +++ b/org.glite.lb.common/src/context.c @@ -77,13 +77,15 @@ void edg_wll_FreeContext(edg_wll_Context ctx) if (ctx->connections->connPool) { int i; - /* Since the introduction of a shared connection pool, the pool cannot freed here. - We only need to unlock connections locked using this context. */ +#ifdef GLITE_LB_THREADED + /* Since the introduction of a shared connection pool, the pool cannot be freed here. + We only need to unlock connections that may have been locked using this context. */ for (i=0; iconnections->poolSize; i++) { if (ctx->connections->locked_by[i]==ctx) { edg_wll_connectionUnlock(ctx, i); } } +#endif /* for (i=0; iconnections->poolSize; i++) { -- 1.8.2.3