[vmkit-commits] [vmkit] r57238 - in /vmkit/trunk: include/mvm/Threads/Thread.h lib/N3/VMCore/N3.cpp lib/N3/VMCore/N3Initialise.cpp lib/N3/VMCore/VMThread.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Mon Oct 6 23:48:17 PDT 2008
Author: geoffray
Date: Tue Oct 7 01:48:16 2008
New Revision: 57238
URL: http://llvm.org/viewvc/llvm-project?rev=57238&view=rev
Log:
Make private the threadKey of the thread.
Modified:
vmkit/trunk/include/mvm/Threads/Thread.h
vmkit/trunk/lib/N3/VMCore/N3.cpp
vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp
vmkit/trunk/lib/N3/VMCore/VMThread.cpp
Modified: vmkit/trunk/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Thread.h?rev=57238&r1=57237&r2=57238&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Threads/Thread.h (original)
+++ vmkit/trunk/include/mvm/Threads/Thread.h Tue Oct 7 01:48:16 2008
@@ -56,11 +56,13 @@
/// Thread instance.
///
static int start(int *tid, int (*fct)(void *), void *arg);
-
+
+private:
/// threadKey - the key for accessing the thread specific data.
///
static mvm::Key<Thread>* threadKey;
+public:
/// GC - The collector of this thread.
///
Collector* GC;
Modified: vmkit/trunk/lib/N3/VMCore/N3.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/N3.cpp?rev=57238&r1=57237&r2=57238&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/N3.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/N3.cpp Tue Oct 7 01:48:16 2008
@@ -80,7 +80,7 @@
vm->bootstrapThread->GC = GC;
mvm::jit::memoryManager->addGCForModule(vm->module, GC);
#endif
- VMThread::threadKey->set(vm->bootstrapThread);
+ VMThread::set(vm->bootstrapThread);
vm->name = "bootstrapN3";
vm->hashUTF8 = UTF8Map::allocate();
@@ -114,7 +114,7 @@
vm->bootstrapThread->GC = GC;
mvm::jit::memoryManager->addGCForModule(vm->module, GC);
#endif
- VMThread::threadKey->set(vm->bootstrapThread);
+ VMThread::set(vm->bootstrapThread);
vm->threadSystem = ThreadSystem::allocateThreadSystem();
vm->name = name;
Modified: vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp?rev=57238&r1=57237&r2=57238&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/N3Initialise.cpp Tue Oct 7 01:48:16 2008
@@ -335,7 +335,7 @@
}
void VirtualMachine::runApplication(int argc, char** argv) {
- mvm::Thread::threadKey->set(this->bootstrapThread);
+ mvm::Thread::set(this->bootstrapThread);
((N3*)this)->runMain(argc, argv);
}
Modified: vmkit/trunk/lib/N3/VMCore/VMThread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMThread.cpp?rev=57238&r1=57237&r2=57238&view=diff
==============================================================================
--- vmkit/trunk/lib/N3/VMCore/VMThread.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/VMThread.cpp Tue Oct 7 01:48:16 2008
@@ -43,7 +43,7 @@
}
VMThread* VMThread::get() {
- return (VMThread*)threadKey->get();
+ return (VMThread*)mvm::Thread::get();
}
extern void AddStandardCompilePasses(llvm::FunctionPassManager*);
More information about the vmkit-commits
mailing list