|
From: <ric...@us...> - 2011-09-06 23:21:44
|
Revision: 1090
http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1090&view=rev
Author: rich_sposato
Date: 2011-09-06 23:21:38 +0000 (Tue, 06 Sep 2011)
Log Message:
-----------
Added return type and return statements to fix bug 3399654.
Modified Paths:
--------------
trunk/include/loki/Threads.h
Modified: trunk/include/loki/Threads.h
===================================================================
--- trunk/include/loki/Threads.h 2011-09-06 23:01:26 UTC (rev 1089)
+++ trunk/include/loki/Threads.h 2011-09-06 23:21:38 UTC (rev 1090)
@@ -127,11 +127,17 @@
return lval; \
} \
\
- static void AtomicAssign(volatile IntType& lval, const IntType val) \
- { InterlockedExchange(&const_cast<IntType&>(lval), val); } \
+ static IntType AtomicAssign(volatile IntType& lval, const IntType val) \
+ { \
+ InterlockedExchange(&const_cast<IntType&>(lval), val); \
+ return lval; \
+ } \
\
- static void AtomicAssign(IntType& lval, volatile const IntType& val) \
- { InterlockedExchange(&lval, val); } \
+ static IntType AtomicAssign(IntType& lval, volatile const IntType& val) \
+ { \
+ InterlockedExchange(&lval, val); \
+ return lval; \
+ } \
\
static IntType AtomicIncrement(volatile IntType& lval, const IntType compare, bool & matches ) \
{ \
@@ -249,7 +255,7 @@
return lval; \
} \
\
- static void AtomicAssign(volatile IntType& lval, const IntType val) \
+ static IntType AtomicAssign(volatile IntType& lval, const IntType val) \
{ \
::pthread_mutex_lock( &atomic_mutex_ ); \
lval = val; \
@@ -257,7 +263,7 @@
return lval; \
} \
\
- static void AtomicAssign(IntType& lval, volatile const IntType& val) \
+ static IntType AtomicAssign(IntType& lval, volatile const IntType& val) \
{ \
::pthread_mutex_lock( &atomic_mutex_ ); \
lval = val; \
@@ -394,11 +400,17 @@
static IntType AtomicDecrement(volatile IntType& lval)
{ return --lval; }
- static void AtomicAssign(volatile IntType & lval, const IntType val)
- { lval = val; }
+ static IntType AtomicAssign(volatile IntType & lval, const IntType val)
+ {
+ lval = val;
+ return lval;
+ }
- static void AtomicAssign(IntType & lval, volatile IntType & val)
- { lval = val; }
+ static IntType AtomicAssign(IntType & lval, volatile IntType & val)
+ {
+ lval = val;
+ return lval;
+ }
static IntType AtomicAdd(volatile IntType& lval, const IntType val, const IntType compare, bool & matches )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|