rename SIMPLE_THREADS_NO_IMPLICIT_YIELD

This commit is contained in:
David Rose 2008-09-11 01:37:12 +00:00
parent 62bc43d13a
commit 75b5e032f0
3 changed files with 30 additions and 3 deletions

View File

@ -426,7 +426,34 @@ release_new() {
nassertv(_attribs_lock->debug_is_locked());
if (_saved_entry != _attribs->end()) {
nassertv(_attribs->find(this) == _saved_entry);
#ifndef NDEBUG
nassertd(_attribs->find(this) == _saved_entry) {
cerr << "Tried to release " << *this << " (" << (void *)this << "), not found!\n";
Attribs::const_iterator si = _attribs->begin();
if (si == _attribs->end()) {
cerr << " Attribs list is empty.\n";
} else {
cerr << " Attribs list contains " << _attribs->size() << " entries.\n";
const RenderAttrib *attrib = (*si);
cerr << " " << *attrib << " (" << (void *)attrib << ")\n";
Attribs::const_iterator sprev = si;
++si;
while (si != _attribs->end()) {
const RenderAttrib *attrib = (*si);
cerr << " " << *attrib << " (" << (void *)attrib << ")\n";
if (!((*sprev) < (*si))) {
cerr << "*** out of order!\n";
}
sprev = si;
++si;
}
cerr << " Done.\n";
}
}
#endif // NDEBUG
_attribs->erase(_saved_entry);
_saved_entry = _attribs->end();
}

View File

@ -33,7 +33,7 @@
// until we have defined the whole ThreadSimpleManager and related
// infrastructure.
#if defined(THREAD_SIMPLE_IMPL) && !defined(SIMPLE_THREADS_NO_IMPLICIT_YIELD)
#if defined(THREAD_SIMPLE_IMPL) && !defined(SIMPLE_THREADS_NO_MUTEX)
#include "mutexSimpleImpl.h"
#include "reMutexSimpleImpl.h"

View File

@ -24,7 +24,7 @@
// Should we implement full thread protection for CopyOnWritePointer?
// If we can be assured that no other thread will interrupt while a
// write pointer is held, we don't need thread protection.
#if defined(HAVE_THREADS) && !(defined(SIMPLE_THREADS) && defined(SIMPLE_THREADS_NO_IMPLICIT_YIELD))
#if defined(HAVE_THREADS) && !(defined(SIMPLE_THREADS) && defined(SIMPLE_THREADS_NO_MUTEX))
#define COW_THREADED 1
#else
#undef COW_THREADED