From 1c43c387b8504f0e6803b3169caffce34213b38c Mon Sep 17 00:00:00 2001 From: aandrei Date: Thu, 10 Jan 2002 21:22:07 +0000 Subject: [PATCH] // January 10, 2002: Fixed bug in AtomicDivide - credit due to Jordi Guerrero git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@11 7ec92016-0320-0410-acc4-a06ded1c099a --- Threads.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Threads.h b/Threads.h index 392f5d9..b9a6729 100644 --- a/Threads.h +++ b/Threads.h @@ -53,7 +53,7 @@ namespace Loki { return ++lval; } static IntType AtomicDivide(volatile IntType& lval) - { return --lval; } + { return lval /= val; } static void AtomicAssign(volatile IntType & lval, IntType val) { lval = val; } @@ -197,6 +197,7 @@ namespace Loki //////////////////////////////////////////////////////////////////////////////// // Change log: // June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!! +// January 10, 2002: Fixed bug in AtomicDivide - credit due to Jordi Guerrero //////////////////////////////////////////////////////////////////////////////// #endif