From 6abdb3c1c1acde3d0c5c06b82b112451f61d443e Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Mon, 31 Aug 2009 00:51:45 +0000 Subject: [PATCH] fix deadlock in inMemoryLog --- src/stasis/logger/inMemoryLog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stasis/logger/inMemoryLog.c b/src/stasis/logger/inMemoryLog.c index 889df06..f8bdab4 100644 --- a/src/stasis/logger/inMemoryLog.c +++ b/src/stasis/logger/inMemoryLog.c @@ -35,8 +35,8 @@ static int stasis_log_impl_in_memory_write_entry(stasis_log_t * log, LogEntry *e lsn_t bufferOffset; int done = 0; + writelock(impl->globalOffset_lock,0); do{ - writelock(impl->globalOffset_lock,0); bufferOffset = impl->nextAvailableLSN - impl->globalOffset; if(bufferOffset > impl->bufferLen) { impl->bufferLen *= 2;