diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-30 08:36:07 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-30 08:36:07 +0000 |
commit | cd7dae28b034deebc9c2c2469ed9d8f1f3dab1ed (patch) | |
tree | 80cead86cff364718c968849e1c185121a79892d /sca-cpp/trunk/kernel/parallel.hpp | |
parent | a9941f3ba6624b88ef62a2a7bf260f50761ffbf9 (diff) |
Added debug macros and cleaned up debug logging. Added locking macros used when compiling for multithreading. Fixed value conversions to numbers. Fixed compile warnings.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@885348 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/kernel/parallel.hpp')
-rw-r--r-- | sca-cpp/trunk/kernel/parallel.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sca-cpp/trunk/kernel/parallel.hpp b/sca-cpp/trunk/kernel/parallel.hpp index c2a948bbeb..987d662e23 100644 --- a/sca-cpp/trunk/kernel/parallel.hpp +++ b/sca-cpp/trunk/kernel/parallel.hpp @@ -28,6 +28,7 @@ #include <pthread.h> #include <sys/syscall.h> + #include "function.hpp" namespace tuscany { @@ -59,11 +60,11 @@ private: } unsigned int acquire() { - return __sync_add_and_fetch(&refCount, 1); + return __sync_add_and_fetch(&refCount, (unsigned int)1); } unsigned int release() { - return __sync_sub_and_fetch(&refCount, 1); + return __sync_sub_and_fetch(&refCount, (unsigned int)1); } bool set(const T& v) { |