From f62513dea89550c74a9e09c1bcd5e7d3fe5dc1e5 Mon Sep 17 00:00:00 2001 From: Michael Ploujnikov Date: Thu, 14 Jan 2010 16:46:27 -0500 Subject: [PATCH] fix compilation errors --- src/backend/threadpool.c | 14 +++++++------- src/lib/condition.h | 4 ++-- src/proc/mobject/placement.hpp | 1 + src/proc/mobject/session/placement-index.cpp | 3 ++- src/proc/mobject/session/placement-index.hpp | 3 ++- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/backend/threadpool.c b/src/backend/threadpool.c index c0757a28d..ce8a7d3e9 100644 --- a/src/backend/threadpool.c +++ b/src/backend/threadpool.c @@ -76,7 +76,7 @@ lumiera_threadpool_destroy(void) LUMIERA_CONDITION_SECTION (threadpool, &threadpool.pool[i].sync) { REQUIRE (0 == threadpool.pool[i].working_thread_count && - 0 = llist_count (&threadpool.pool[i].working_list), + 0 == llist_count (&threadpool.pool[i].working_list), "%d(%d) threads are still running", threadpool.pool[i].working_thread_count, llist_count (&threadpool.pool[i].working_list)); @@ -111,7 +111,7 @@ lumiera_threadpool_acquire_thread(enum lumiera_thread_class kind, &threadpool.pool[kind].pthread_attrs); ENSURE (ret, "did not create a valid thread"); TODO ("no error handing, let the resourcecollector do it, no need when returning the thread"); - LUMIERA_CONDITION_WAIT (!llist_is_empty (&threadpool.pool[kind].idel_list)); + LUMIERA_CONDITION_WAIT (!llist_is_empty (&threadpool.pool[kind].idle_list)); } // use an existing thread, pick the first one // remove it from the pool's list @@ -122,7 +122,7 @@ lumiera_threadpool_acquire_thread(enum lumiera_thread_class kind, REQUIRE (ret->state == LUMIERA_THREADSTATE_IDLE, "trying to return a non-idle thread (state=%s)", lumiera_threadstate_names[ret->state]); // move thread to the working_list - llist_insert_head (&threadpool.pool[kind].working_list, ret); + llist_insert_head (&threadpool.pool[kind].working_list, &ret->node); threadpool.pool[kind].working_thread_count++; threadpool.pool[kind].idle_thread_count--; // cheaper than using llist_count @@ -161,16 +161,16 @@ lumiera_threadpool_release_thread(LumieraThread thread) threadpool.pool[thread->kind].idle_thread_count++; // cheaper than using llist_count ENSURE (threadpool.pool[thread->kind].idle_thread_count == - llist_count (&threadpool.pool[thread->kind].list), + llist_count (&threadpool.pool[thread->kind].idle_list), "idle thread count %d is wrong, should be %d", threadpool.pool[thread->kind].idle_thread_count, - llist_count (&threadpool.pool[thread->kind].list)); + llist_count (&threadpool.pool[thread->kind].idle_list)); ENSURE (threadpool.pool[thread->kind].working_thread_count == llist_count (&threadpool.pool[thread->kind].working_list), "working thread count %d is wrong, should be %d", threadpool.pool[thread->kind].working_thread_count, - llist_count (&threadpool.pool[thread->kind].workinglist)); - REQUIRE (!llist_is_empty (&threadpool.pool[thread->kind].list), "thread pool is still empty after insertion"); + llist_count (&threadpool.pool[thread->kind].working_list)); + REQUIRE (!llist_is_empty (&threadpool.pool[thread->kind].idle_list), "thread pool is still empty after insertion"); LUMIERA_CONDITION_BROADCAST; } } diff --git a/src/lib/condition.h b/src/lib/condition.h index 293d0143e..d75844144 100644 --- a/src/lib/condition.h +++ b/src/lib/condition.h @@ -123,7 +123,7 @@ */ #define LUMIERA_CONDITION_SIGNAL \ do { \ - REQUIRE (lumiera_cond_section_.lock, "Condition mutex not locked"); \ + REQUIRE (lumiera_lock_section_.lock, "Condition mutex not locked"); \ lumiera_condition_signal (lumiera_lock_section_.lock, \ lumiera_lock_section_.flag); \ } while (0) @@ -136,7 +136,7 @@ */ #define LUMIERA_CONDITION_BROADCAST \ do { \ - REQUIRE (lumiera_cond_section_.lock, "Condition mutex not locked"); \ + REQUIRE (lumiera_lock_section_.lock, "Condition mutex not locked"); \ lumiera_condition_broadcast (lumiera_lock_section_.lock, \ lumiera_lock_section_.flag); \ } while (0) diff --git a/src/proc/mobject/placement.hpp b/src/proc/mobject/placement.hpp index 1ebb966ac..569dc6686 100644 --- a/src/proc/mobject/placement.hpp +++ b/src/proc/mobject/placement.hpp @@ -242,6 +242,7 @@ namespace mobject { /** @todo cleanup uses of ref-to-placement. See Ticket #115 */ typedef Placement PlacementMO; + //‘typedef class mobject::Placement mobject::PlacementMO’ typedef Placement PMO; diff --git a/src/proc/mobject/session/placement-index.cpp b/src/proc/mobject/session/placement-index.cpp index f55e6fc3a..adbad89b8 100644 --- a/src/proc/mobject/session/placement-index.cpp +++ b/src/proc/mobject/session/placement-index.cpp @@ -95,7 +95,8 @@ namespace session { /* some type shorthands */ - typedef PlacementIndex::PlacementMO PlacementMO; + //typedef PlacementIndex::PlacementMO PlacementMO; + typedef mobject::PlacementMO PlacementMO; typedef PlacementIndex::PRef PRef; typedef PlacementIndex::ID ID; diff --git a/src/proc/mobject/session/placement-index.hpp b/src/proc/mobject/session/placement-index.hpp index a8df50b2a..537212a8d 100644 --- a/src/proc/mobject/session/placement-index.hpp +++ b/src/proc/mobject/session/placement-index.hpp @@ -160,7 +160,8 @@ namespace session { public: - typedef Placement PlacementMO; + //typedef Placement PlacementMO; + // ‘typedef class mobject::Placement mobject::session::PlacementIndex::PlacementMO’ typedef PlacementRef PRef; typedef PlacementMO::ID const& ID;