Text archives Help
- From: "Solomon Boulos" <boulos@cs.utah.edu>
- To: manta@sci.utah.edu
- Subject: [Manta] r2054 - in trunk: Core/Thread Engine/Control
- Date: Tue, 12 Feb 2008 17:24:46 -0700 (MST)
Author: boulos
Date: Tue Feb 12 17:24:34 2008
New Revision: 2054
Modified:
trunk/Core/Thread/Thread_win32.cc
trunk/Engine/Control/RTRT.cc
Log:
Core/Thread/Thread_win32.cc
Implementing operator+= for the win32 AtomicCounter too...
Engine/Control/RTRT.cc
Maybe not everyone wants to add their root object to the update graph ;)
Modified: trunk/Core/Thread/Thread_win32.cc
==============================================================================
--- trunk/Core/Thread/Thread_win32.cc (original)
+++ trunk/Core/Thread/Thread_win32.cc Tue Feb 12 17:24:34 2008
@@ -365,6 +365,18 @@
}
int
+AtomicCounter::operator+=(int val)
+{
+ int oldstate = Thread::couldBlock(name_);
+ priv_->lock.lock();
+ priv_->value += val;
+ int ret=priv_->value;
+ priv_->lock.unlock();
+ Thread::couldBlockDone(oldstate);
+ return ret;
+}
+
+int
AtomicCounter::operator--()
{
int oldstate = Thread::couldBlock(name_);
@@ -790,7 +802,7 @@
threadids[mainthread->priv_->threadid] = mainthread;
- cerr << "mainthread id = " << mainthread->priv_->threadid << endl;
+ //cerr << "mainthread id = " << mainthread->priv_->threadid << endl;
//thread_local = new ThreadLocalMemory;
//thread_local->current_thread = mainthread;
@@ -830,7 +842,6 @@
}
//#endif
Thread::initialized = true;
- cerr << "Win32 threads initialized\n";
}
void Thread_run(Thread* t)
Modified: trunk/Engine/Control/RTRT.cc
==============================================================================
--- trunk/Engine/Control/RTRT.cc (original)
+++ trunk/Engine/Control/RTRT.cc Tue Feb 12 17:24:34 2008
@@ -681,7 +681,7 @@
// ensure everything is thread-safe throughout the tree.
if (proc == 0) {
doPreprocess(proc, 1);
- scene->getObject()->addToUpdateGraph(update_graph, NULL);
+ //scene->getObject()->addToUpdateGraph(update_graph, NULL);
//update_graph->print(scene->getObject());
}
- [Manta] r2054 - in trunk: Core/Thread Engine/Control, Solomon Boulos, 02/12/2008
Archive powered by MHonArc 2.6.16.