summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/kernel/parallel.hpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-30 08:36:07 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-30 08:36:07 +0000
commitcd7dae28b034deebc9c2c2469ed9d8f1f3dab1ed (patch)
tree80cead86cff364718c968849e1c185121a79892d /sca-cpp/trunk/kernel/parallel.hpp
parenta9941f3ba6624b88ef62a2a7bf260f50761ffbf9 (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.hpp5
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) {