summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/js/eval.hpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-08-28 02:50:02 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-08-28 02:50:02 +0000
commit29edc4e6fb2c8fb3a93aac36d9666efd21b92bd0 (patch)
tree2b1998d904a16cdce69f69041c89cc56d474e69e /sca-cpp/trunk/modules/js/eval.hpp
parentd93ec216d63aed8ff2f08b4cba7de965dc14639c (diff)
Implement a portable alternative to __thread and get the HTTP and SQLDB components and the Auth modules working with the HTTPD multithreaded event MPM.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1162472 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/js/eval.hpp')
-rw-r--r--sca-cpp/trunk/modules/js/eval.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/js/eval.hpp b/sca-cpp/trunk/modules/js/eval.hpp
index f18c3e41c9..69863c9831 100644
--- a/sca-cpp/trunk/modules/js/eval.hpp
+++ b/sca-cpp/trunk/modules/js/eval.hpp
@@ -43,6 +43,7 @@
#include "value.hpp"
#include "element.hpp"
#include "monad.hpp"
+#include "parallel.hpp"
namespace tuscany {
namespace js {
@@ -106,9 +107,10 @@ JSClass jsGlobalClass = { "global", JSCLASS_GLOBAL_FLAGS,
* Represents a JavaScript context. Maintains one context per thread.
*/
#ifdef WANT_THREADS
-__thread
-#endif
+perthread_ptr<JSContext> jsContext;
+#else
::JSContext* jsContext = NULL;
+#endif
class JSContext {
public: