From b91c6e9759a10fc018ee00a1639af574b15ab269 Mon Sep 17 00:00:00 2001 From: prascle Date: Sat, 3 Dec 2005 13:24:47 +0000 Subject: [PATCH] PR: a cause of bad traces th. 0... --- src/SALOMELocalTrace/LocalTraceBufferPool.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx index 8fd4c5bf2..4523a897d 100644 --- a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx +++ b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx @@ -312,8 +312,8 @@ unsigned long LocalTraceBufferPool::lockedIncrement(unsigned long& pos) { int ret; ret = pthread_mutex_lock(&_incrementMutex); // lock access to counters - pos++; + unsigned long mypos = ++pos; ret = pthread_mutex_unlock(&_incrementMutex); // release lock - return pos; + return mypos; } -- 2.39.2