[vmkit-commits] [vmkit] r139719 - /vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Wed Sep 14 12:49:54 PDT 2011
Author: geoffray
Date: Wed Sep 14 14:49:54 2011
New Revision: 139719
URL: http://llvm.org/viewvc/llvm-project?rev=139719&view=rev
Log:
Don't detach threads since we're joining them.
Modified:
vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp
Modified: vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp?rev=139719&r1=139718&r2=139719&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp Wed Sep 14 14:49:54 2011
@@ -334,8 +334,6 @@
/// start - Called by the creator of the thread to run the new thread.
-/// The thread is in a detached state, because each virtual machine has
-/// its own way of waiting for created threads.
int Thread::start(void (*fct)(mvm::Thread*)) {
pthread_attr_t attributs;
pthread_attr_init(&attributs);
@@ -346,7 +344,6 @@
MyVM->addThread(this);
int res = pthread_create((pthread_t*)(void*)(&internalThreadID), &attributs,
(void* (*)(void *))internalThreadStart, this);
- pthread_detach((pthread_t)internalThreadID);
pthread_attr_destroy(&attributs);
return res;
}
More information about the vmkit-commits
mailing list