[vmkit-commits] [vmkit] r86272 - in /vmkit/trunk: include/mvm/Threads/CollectionRV.h lib/Mvm/CommonThread/CollectionRV.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Fri Nov 6 10:38:48 PST 2009
Author: geoffray
Date: Fri Nov 6 12:38:47 2009
New Revision: 86272
URL: http://llvm.org/viewvc/llvm-project?rev=86272&view=rev
Log:
No need for an initiator.
Modified:
vmkit/trunk/include/mvm/Threads/CollectionRV.h
vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp
Modified: vmkit/trunk/include/mvm/Threads/CollectionRV.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/CollectionRV.h?rev=86272&r1=86271&r2=86272&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Threads/CollectionRV.h (original)
+++ vmkit/trunk/include/mvm/Threads/CollectionRV.h Fri Nov 6 12:38:47 2009
@@ -30,9 +30,6 @@
/// nbJoined - Number of threads that joined the rendezvous.
unsigned nbJoined;
- /// initiator - The initiating thread for rendezvous.
- mvm::Thread* initiator;
-
/// cooperative - Is the rendez-vous cooperative?
bool cooperative;
@@ -41,14 +38,9 @@
public:
- mvm::Thread* getInitiator() {
- return initiator;
- }
-
CollectionRV() {
rendezvousNb = 0;
nbJoined = 0;
- initiator = 0;
#ifdef WITH_LLVM_GCC
cooperative = true;
#else
@@ -72,6 +64,7 @@
void finishRV() {
if (cooperative) {
+ mvm::Thread* initiator = mvm::Thread::get();
mvm::Thread* cur = initiator;
do {
cur->doYield = false;
@@ -79,9 +72,10 @@
} while (cur != initiator);
}
+ nbJoined = 0;
rendezvousNb++;
condEndRV.broadcast();
- initiator->inRV = false;
+ mvm::Thread::get()->inRV = false;
unlockRV();
}
Modified: vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp?rev=86272&r1=86271&r2=86272&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp Fri Nov 6 12:38:47 2009
@@ -43,8 +43,6 @@
self->MyVM->ThreadLock.lock();
if (cooperative) {
- initiator = self;
- nbJoined = 0;
mvm::Thread* cur = self;
do {
@@ -66,8 +64,6 @@
mvm::Thread* self = mvm::Thread::get();
self->joinedRV = false;
assert(self && "No thread local data for this thread");
- initiator = self;
- nbJoined = 0;
for (mvm::Thread* cur = (mvm::Thread*)self->next(); cur != self;
cur = (mvm::Thread*)cur->next()) {
More information about the vmkit-commits
mailing list