diff options
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 15 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 15 | ||||
-rw-r--r-- | ace/Malloc_T.cpp | 4 | ||||
-rw-r--r-- | ace/Thread_Manager.cpp | 14 | ||||
-rwxr-xr-x | ace/ace.icc | 3 | ||||
-rw-r--r-- | tests/Refcounted_Auto_Ptr_Test.cpp | 8 |
7 files changed, 64 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog index 940f7c2fab2..06af9405b06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +Mon Jun 18 15:29:38 2001 Steve Huston <shuston@riverace.com> + + * ace/ace.icc: Replace Obstack.cpp with Obchunk.cpp; added + Obchunk.h + + * ace/Thread_Manager.cpp (task_all_list): Don't put duplicate + ACE_Task_Base pointers in the returned list. + + * ace/Malloc_T.cpp (ACE_Malloc<>::ACE_Malloc (3 args): Add \n + to the failure ACE_ERROR statement. + + * tests/Refcounted_Auto_Ptr_Test.cpp: Print the instance count + of the refcounted variable before asserting on it in order to + leave interesting info in the log if it bombs. + Mon Jun 18 10:06:37 2001 Chris Cleeland <cleeland_c@ociweb.com> * etc/tao_ssliop.doxygen: New configuration file for diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 940f7c2fab2..06af9405b06 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,18 @@ +Mon Jun 18 15:29:38 2001 Steve Huston <shuston@riverace.com> + + * ace/ace.icc: Replace Obstack.cpp with Obchunk.cpp; added + Obchunk.h + + * ace/Thread_Manager.cpp (task_all_list): Don't put duplicate + ACE_Task_Base pointers in the returned list. + + * ace/Malloc_T.cpp (ACE_Malloc<>::ACE_Malloc (3 args): Add \n + to the failure ACE_ERROR statement. + + * tests/Refcounted_Auto_Ptr_Test.cpp: Print the instance count + of the refcounted variable before asserting on it in order to + leave interesting info in the log if it bombs. + Mon Jun 18 10:06:37 2001 Chris Cleeland <cleeland_c@ociweb.com> * etc/tao_ssliop.doxygen: New configuration file for diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 940f7c2fab2..06af9405b06 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,18 @@ +Mon Jun 18 15:29:38 2001 Steve Huston <shuston@riverace.com> + + * ace/ace.icc: Replace Obstack.cpp with Obchunk.cpp; added + Obchunk.h + + * ace/Thread_Manager.cpp (task_all_list): Don't put duplicate + ACE_Task_Base pointers in the returned list. + + * ace/Malloc_T.cpp (ACE_Malloc<>::ACE_Malloc (3 args): Add \n + to the failure ACE_ERROR statement. + + * tests/Refcounted_Auto_Ptr_Test.cpp: Print the instance count + of the refcounted variable before asserting on it in order to + leave interesting info in the log if it bombs. + Mon Jun 18 10:06:37 2001 Chris Cleeland <cleeland_c@ociweb.com> * etc/tao_ssliop.doxygen: New configuration file for diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp index 084331b08b9..08de9b70109 100644 --- a/ace/Malloc_T.cpp +++ b/ace/Malloc_T.cpp @@ -258,7 +258,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T"); if (this->open () == -1) ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p"), + ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T"))); } @@ -274,7 +274,7 @@ ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T (const ACE_TCHAR *p ACE_TRACE ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T"); if (this->open () == -1) ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p"), + ACE_LIB_TEXT ("%p\n"), ACE_LIB_TEXT ("ACE_Malloc_T<ACE_MEM_POOL_2, ACE_LOCK, ACE_CB>::ACE_Malloc_T"))); } #endif /* ACE_HAS_TEMPLATE_TYPEDEFS */ diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp index a9578efc99b..e1035372ebe 100644 --- a/ace/Thread_Manager.cpp +++ b/ace/Thread_Manager.cpp @@ -1975,7 +1975,6 @@ ACE_Thread_Manager::task_all_list (ACE_Task_Base *task_list[], ACE_TRACE ("ACE_Thread_Manager::task_all_list"); ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1)); - ACE_Task_Base **task_list_iterator = task_list; size_t task_list_count = 0; for (ACE_Double_Linked_List_Iterator<ACE_Thread_Descriptor> iter (this->thr_list_); @@ -1985,10 +1984,17 @@ ACE_Thread_Manager::task_all_list (ACE_Task_Base *task_list[], if (task_list_count >= n) break; - if ( iter.next ()->task_ ) + ACE_Task_Base *task_p = iter.next ()->task_; + if (0 != task_p) { - task_list_iterator[task_list_count] = iter.next ()->task_; - task_list_count++; + // This thread has a task pointer; see if it's already in the + // list. Don't add duplicates. + size_t i = 0; + for (; i < task_list_count; ++i) + if (task_list[i] == task_p) + break; + if (i == task_list_count) // No match - add this one + task_list[task_list_count++] = task_p; } } diff --git a/ace/ace.icc b/ace/ace.icc index 09c3bb81239..b0f228139ac 100755 --- a/ace/ace.icc +++ b/ace/ace.icc @@ -403,7 +403,7 @@ group MEMORY_FILES = "Malloc_Allocator.cpp", "Mem_Map.cpp", "Memory_Pool.cpp", - "Obstack.cpp", + "Obchunk.cpp", "Read_Buffer.cpp", "Shared_Memory.cpp", "Shared_Memory_MM.cpp", @@ -416,6 +416,7 @@ group MEMORY_INCLUDES = "Malloc_Allocator.h", "Mem_Map.h", "Memory_Pool.h", + "Obchunk.h", "Obstack.h", "Read_Buffer.h", "Shared_Memory.h", diff --git a/tests/Refcounted_Auto_Ptr_Test.cpp b/tests/Refcounted_Auto_Ptr_Test.cpp index 9f89ae24373..b15146df817 100644 --- a/tests/Refcounted_Auto_Ptr_Test.cpp +++ b/tests/Refcounted_Auto_Ptr_Test.cpp @@ -1,4 +1,4 @@ -// -*- C++ -*- +// $Id$ //============================================================================= /** @@ -340,7 +340,8 @@ main (int, ACE_TCHAR *[]) ACE_Refcounted_Auto_Ptr<Printer, ACE_Null_Mutex> r6 = r1; } ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) Printer object should have been deleted\n"))); + ACE_TEXT ("(%t) Printer instance count is %d, expecting 0\n"), + Printer::instance_count_)); ACE_ASSERT (Printer::instance_count_ == 0); #if defined (ACE_HAS_THREADS) @@ -382,7 +383,8 @@ main (int, ACE_TCHAR *[]) scheduler->wait (); ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) Printer object should have been deleted\n"))); + ACE_TEXT ("(%t) Printer instance count is %d, expecting 0\n"), + Printer::instance_count_)); ACE_ASSERT (Printer::instance_count_ == 0); #endif /* ACE_HAS_THREADS */ |