diff options
author | Jose <jose@zeroc.com> | 2009-07-10 14:40:47 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-07-10 14:40:47 +0200 |
commit | 4fa7afeb9896d550b5b03949d632abac427474c4 (patch) | |
tree | 45665857beb6d2412b9fcf1d77254a0d584d6967 /cpp/src/FreezeScript/Parser.cpp | |
parent | Revert 3965 - new version of Ice::initialize. (diff) | |
download | ice-4fa7afeb9896d550b5b03949d632abac427474c4.tar.bz2 ice-4fa7afeb9896d550b5b03949d632abac427474c4.tar.xz ice-4fa7afeb9896d550b5b03949d632abac427474c4.zip |
Squashed commit of ice-rt branch:
commit 831a201c23d4a4aee9041c20d16e194e918fbb06
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Thu Jul 9 19:59:57 2009 +0200
Fix typo.
commit 3447d3d63c56d0a948b756d5152b8fe072db2618
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Thu Jul 9 19:58:42 2009 +0200
Fix collector thread start.
commit ef6e69a167ee4a6cf1c033569b8233f5a891b91b
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Thu Jul 9 17:39:03 2009 +0200
Disable test on OS X
commit f76e7c2d4027af7d840cf4a59d74aa9872055f6e
Author: root <root@dhcppc0.(none)>
Date: Thu Jul 9 17:25:44 2009 +0200
Disable priority test in Os x
commit 01afc1706ecb53ab1b95980ef1e1949cea4af243
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Thu Jul 9 17:00:55 2009 +0200
Osx Fix
commit 89509ad18da576949164d9740600edf8ae5db739
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Thu Jul 9 16:39:47 2009 +0200
Minor fixes
commit c89a1e5fe9c344c6bfb4d588d8faa79834bc3106
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Tue Jul 7 15:42:03 2009 +0200
Support for MIN_PRIORITY, NORM_PRIORITY, MAX_PRIORITY in Java.
commit 9d73fc28719e73e930a8b616e4de31ded64e6a41
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Tue Jul 7 00:57:30 2009 +0200
setPriority fixes.
commit 44e89ea3092fa9cda1573bb2dae57d4a76da35e2
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Mon Jul 6 18:26:51 2009 +0200
Thread priority fixes.
commit eb689a397a0d53ef3f3448736c8cd103e369df6a
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Tue Jun 30 21:49:09 2009 +0200
Fix MutexPtr to set _acquired false on release.
commit 22dd76d2a08f34d306cfc7508a5465435aa600d1
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Tue Jun 30 17:31:30 2009 +0200
Code style fixes to thread priority changes.
commit e04c19a06167b9b58e52144946a00cdf01e3500f
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Mon Jun 29 22:20:23 2009 +0200
Changes to thread priority support. and global static removes.
commit aed0ae1e9f6ae7e33cd2dcd390be1bcdc4270378
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Fri Jun 26 16:19:23 2009 +0200
Add support to set Thread priorities to C#
commit fff01616d2fffde5e6a7b3920228bb861b4e16d8
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Thu Jun 25 18:49:23 2009 +0200
replace static with anon namespace
commit 34c84d7d6e1591210b1a6d79def79cb5fcc8bd19
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Wed Jun 24 17:23:46 2009 +0200
Add call to TestUtil.cleanup
commit 58e2e13803e154dd2c5a26117c396f0ddf40d189
Author: Jose Gutierrez <pepone@dhcppc0.(none)>
Date: Tue Jun 23 21:02:43 2009 +0200
Remove priorities for throughput test.
commit 679f2b9690db5cad7a9437de72640a38a977e555
Author: Jose Gutierrez <jose@zeroc.com>
Date: Thu Dec 4 00:44:38 2008 +0100
Updates to real time priorities
commit 78eb230923f57d968ceb78c5a670b7ef3ab10e24
Author: Jose Gutierrez <jose@zeroc.com>
Date: Wed Dec 3 02:23:00 2008 +0100
Sync priority inversion test with simplication of this test in icee-rt
commit fdd8fcd6f171bd456e335f82dfa3e64974c0220e
Author: Jose Gutierrez <jose@zeroc.com>
Date: Wed Dec 3 02:22:34 2008 +0100
Remove static mutex from demo book lifecycle
commit 1c646ad332d931de3f716bb5130bac360a4cf198
Author: Jose Gutierrez <jose@zeroc.com>
Date: Wed Dec 3 02:22:00 2008 +0100
Fix allTest to run rt test only as root in unix.
commit e813ef4101700584b6464de99066137247fe21a8
Author: Jose Gutierrez <jose@zeroc.com>
Date: Wed Dec 3 02:08:07 2008 +0100
More StaticMutex removed.
commit 289d83a46d72091f65ff99c0e151aedf0bd60417
Author: Jose Gutierrez <jose@zeroc.com>
Date: Wed Dec 3 01:34:32 2008 +0100
End remove StaticMutex usage from Ice
commit d422e04009a8627c73269f2824bd842453cea319
Author: Jose Gutierrez <jose@zeroc.com>
Date: Wed Dec 3 00:21:21 2008 +0100
Remove StaticMutex use in Ice tests
commit 275baefd6b8b45be33d9e098ec38ab69c6cf981b
Author: Jose Gutierrez <jose@zeroc.com>
Date: Tue Dec 2 22:39:15 2008 +0100
Removing StaticMutex used in Ice core and Ice services.
commit 31b496ffda0a6def8097c46b7269b73d174ba495
Author: Jose Gutierrez <jose@zeroc.com>
Date: Tue Dec 2 00:43:42 2008 +0100
Sync changes with latest changes in icee-rt.
commit b31abef3b24131214908664bb488ba2069c0b8c1
Author: Jose Gutierrez <jose@zeroc.com>
Date: Fri Nov 14 19:44:28 2008 +0100
Change test assertions
commit b81f4d8854580e7c2cc9faef3c648f8ccd4484e0
Author: Jose Gutierrez <jose@zeroc.com>
Date: Fri Nov 14 19:23:34 2008 +0100
Priority inversion test fixes.
commit 3d35130b569c20ddd2da74fed39d1c78b7430c9e
Author: Jose Gutierrez <jose@zeroc.com>
Date: Fri Nov 14 02:08:06 2008 +0100
Fixes to priority inversion test.
commit 0e158c1bba306184ac4cd166c88ca62dbc557331
Author: Jose Gutierrez <jose@zeroc.com>
Date: Fri Nov 14 00:32:36 2008 +0100
Priority inheritance protocol for Mutex and RecMutex posix implementation.
commit 2587e416316046ac6f3baacee5c73b2a9205703b
Author: Jose Gutierrez <jose@zeroc.com>
Date: Wed Nov 12 19:40:48 2008 +0100
Fix icert.config used in test/Ice/priority
commit 7b1f0a67de9acf6e2b0f8e485ed05e726705f257
Author: Jose Gutierrez <jose@zeroc.com>
Date: Wed Nov 12 19:23:06 2008 +0100
Fix Thread::start to no use duplicate code.
Remove ThreadPriorityException and uset ThreadSyscallException instead.
Remove the change to timer test for real tiem priority timers as require root
user is better to put this in a separte test.
commit 0890d83b0229e09e91ce6393b7f5fc2abd73d020
Author: Jose Gutierrez <jose@zeroc.com>
Date: Wed Nov 12 17:58:12 2008 +0100
Ice real time priority support.
Diffstat (limited to 'cpp/src/FreezeScript/Parser.cpp')
-rw-r--r-- | cpp/src/FreezeScript/Parser.cpp | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/cpp/src/FreezeScript/Parser.cpp b/cpp/src/FreezeScript/Parser.cpp index cd8239014c7..28d12bebd41 100644 --- a/cpp/src/FreezeScript/Parser.cpp +++ b/cpp/src/FreezeScript/Parser.cpp @@ -9,7 +9,8 @@ #include <FreezeScript/Parser.h> #include <FreezeScript/GrammarUtil.h> -#include <IceUtil/StaticMutex.h> +#include <IceUtil/Mutex.h> +#include <IceUtil/MutexPtrLock.h> using namespace std; @@ -64,9 +65,33 @@ FreezeScript::ErrorReporterPtr FreezeScript::parseErrorReporter; FreezeScript::NodePtr FreezeScript::parseResult; int FreezeScript::parseLine; -static string _input; -static string::size_type _pos; -static IceUtil::StaticMutex _parserMutex = ICE_STATIC_MUTEX_INITIALIZER; +namespace +{ + +string _input; +string::size_type _pos; + +IceUtil::Mutex* _parserMutex = 0; + +class Init +{ +public: + + Init() + { + _parserMutex = new IceUtil::Mutex; + } + + ~Init() + { + delete _parserMutex; + _parserMutex = 0; + } +}; + +Init init; + +} // // parseExpression @@ -77,7 +102,7 @@ FreezeScript::parseExpression(const string& expr, const DataFactoryPtr& factory, // // The bison grammar is not thread-safe. // - IceUtil::StaticMutex::Lock sync(_parserMutex); + IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(_parserMutex); parseDataFactory = factory; parseErrorReporter = errorReporter; |