From b8edddfb87430fe4552f508889d1633905b9820b Mon Sep 17 00:00:00 2001 From: schmidt Date: Tue, 25 Feb 1997 06:01:48 +0000 Subject: *** empty log message *** --- ChangeLog-97a | 40 ++++++++++++++-------- README | 2 ++ ace/Log_Msg.cpp | 2 +- ace/Malloc_T.cpp | 5 +-- ace/Synch.cpp | 24 ++++++------- ace/config-sunos5.4-g++.h | 2 ++ ace/config-sunos5.5-g++.h | 2 ++ examples/Connection/non_blocking/CPP-connector.cpp | 2 +- 8 files changed, 48 insertions(+), 31 deletions(-) diff --git a/ChangeLog-97a b/ChangeLog-97a index fa5292ca63f..344b46a7888 100644 --- a/ChangeLog-97a +++ b/ChangeLog-97a @@ -1,20 +1,16 @@ -Mon Feb 24 20:28:10 1997 David L. Levine - - * ace/OS.h: use signed __int64 for ACE_hrtime_t because VC++ - won't convert unsigned __int64 to double. Thanks to Irfan - for reporting this. +Mon Feb 24 17:16:06 1997 Douglas C. Schmidt - * include/makeinclude/platform_{irix5.3_g++,linux*,m88k, - osf1_4.0_g++,sco-nothread,sunos*g++,unixware_g++}.GNU: - changed C++ compiler (CXX) from gcc to g++ so that libg++ - will be linked in. Thanks to James CE Johnson - for suggesting this. + * ace/Log_Msg.cpp (ACE_Log_Msg): Enable the thread-specific + tracing flag by default. This ensures that tracing will work + "out of the box." - * examples/IOStream/{client,server}/Makefile,tests/Makefile: - removed -lg++, when gcc is the compiler, because it's no - longer needed with g++ as the compiler. + * ace/config-sunos5.[45]-g++.h: Added a #define for + ACE_HAS_TERM_IOCTLS. Thanks to Joey Zhu for + reporting this. -Mon Feb 24 11:52:08 1997 Douglas C. Schmidt + * ace/Synch.cpp (acquire): Simplified the recursive mutex logic + for acquire(). Thanks to Arthur J. Lewis" + for reporting this. * examples/Connection/non_blocking/CPP-acceptor.cpp (init): Added a #ifdef for ACE_WIN32 so that we don't register the signal @@ -30,6 +26,22 @@ Mon Feb 24 11:52:08 1997 Douglas C. Schmidt Win32. Thanks to Ivan Murphy for reporting this problem. +Mon Feb 24 20:28:10 1997 David L. Levine + + * ace/OS.h: use signed __int64 for ACE_hrtime_t because VC++ + won't convert unsigned __int64 to double. Thanks to Irfan + for reporting this. + + * include/makeinclude/platform_{irix5.3_g++,linux*,m88k, + osf1_4.0_g++,sco-nothread,sunos*g++,unixware_g++}.GNU: + changed C++ compiler (CXX) from gcc to g++ so that libg++ + will be linked in. Thanks to James CE Johnson + for suggesting this. + + * examples/IOStream/{client,server}/Makefile,tests/Makefile: + removed -lg++, when gcc is the compiler, because it's no + longer needed with g++ as the compiler. + Sat Feb 22 23:03:45 1997 David L. Levine * ace/OS.i: restored version 4.89 and 4.90 changes that diff --git a/README b/README index ce76e766523..7818ee66025 100644 --- a/README +++ b/README @@ -476,6 +476,8 @@ Jorn Jensen Paul Roman Dave Mayerhoefer Bert Craytor +Joey Zhu +Arthur J. Lewis" I would particularly like to thank Paul Stephenson, who worked with me at Ericsson and is now at ObjectSpace. Paul devised the recursive diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index 8f3bb391fd2..beb59ad8733 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -278,7 +278,7 @@ ACE_Log_Msg::ACE_Log_Msg (void) trace_depth_ (0), thr_handle_ (0), trace_active_ (0), - tracing_enabled_ (0), // Off by default? + tracing_enabled_ (1), // On by default? thr_state_ (0), priority_mask_ (LM_SHUTDOWN // By default, all priorities are enabled. | LM_TRACE diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp index 4a45dbcb3cb..4eee920fae8 100644 --- a/ace/Malloc_T.cpp +++ b/ace/Malloc_T.cpp @@ -221,8 +221,9 @@ ACE_Malloc::shared_malloc (size_t nbytes) ACE_TRACE ("ACE_Malloc::shared_malloc"); // Round up request to a multiple of the ACE_Malloc_Header size. - size_t nunits = (nbytes + sizeof (ACE_Malloc_Header) - 1) - / sizeof (ACE_Malloc_Header) + 1; + size_t nunits = + (nbytes + sizeof (ACE_Malloc_Header) - 1) / sizeof (ACE_Malloc_Header) + + 1; // Add one for the itself. // Begin the search starting at the place in the freelist // where the last block was found. diff --git a/ace/Synch.cpp b/ace/Synch.cpp index e2a38fdd5ec..f79179b226e 100644 --- a/ace/Synch.cpp +++ b/ace/Synch.cpp @@ -508,31 +508,29 @@ ACE_Recursive_Thread_Mutex::acquire (void) // ACE_TRACE ("ACE_Recursive_Thread_Mutex::acquire"); ACE_thread_t t_id = ACE_Thread::self (); + // Acquire the guard. ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->nesting_mutex_, -1); - // If there's no contention, just grab the lock immediately. + // If there's no contention, just grab the lock immediately (since + // this is the common case we'll optimize for it). if (this->nesting_level_ == 0) - { - this->set_thread_id (t_id); - this->nesting_level_ = 1; - } + this->set_thread_id (t_id); // If we already own the lock, then increment the nesting level and - // proceed. - else if (ACE_OS::thr_equal (t_id, this->owner_id_)) - this->nesting_level_++; - else + // return. + else if (ACE_OS::thr_equal (t_id, this->owner_id_) == 0) { - // Wait until the nesting level has dropped to zero, - // at which point we can acquire the lock. + // Wait until the nesting level has dropped to zero, at which + // point we can acquire the lock. while (this->nesting_level_ > 0) this->lock_available_.wait (); // Note that at this point the nesting_mutex_ is held... - this->set_thread_id (t_id); - this->nesting_level_ = 1; } + // At this point, we can safely increment the nesting_level_ no + // matter how we got here! + this->nesting_level_++; return 0; } diff --git a/ace/config-sunos5.4-g++.h b/ace/config-sunos5.4-g++.h index 58c9f494efc..8a02bfc5125 100644 --- a/ace/config-sunos5.4-g++.h +++ b/ace/config-sunos5.4-g++.h @@ -9,6 +9,8 @@ #define ACE_HAS_UNICODE +#define ACE_HAS_TERM_IOCTLS + // Must specialize templates due to G++'s lame parameterized type // support... #define ACE_TEMPLATES_REQUIRE_SPECIALIZATION diff --git a/ace/config-sunos5.5-g++.h b/ace/config-sunos5.5-g++.h index 0f999b28360..7bdc430754a 100644 --- a/ace/config-sunos5.5-g++.h +++ b/ace/config-sunos5.5-g++.h @@ -23,6 +23,8 @@ // G++ doesn't support template typedefs fully (yet). // #define ACE_HAS_TEMPLATE_TYPEDEFS +#define ACE_HAS_TERM_IOCTLS + // Must specialize templates due to G++'s lame parameterized type // support... #define ACE_TEMPLATES_REQUIRE_SPECIALIZATION diff --git a/examples/Connection/non_blocking/CPP-connector.cpp b/examples/Connection/non_blocking/CPP-connector.cpp index 35c21c5e593..5ac1a44acde 100644 --- a/examples/Connection/non_blocking/CPP-connector.cpp +++ b/examples/Connection/non_blocking/CPP-connector.cpp @@ -195,7 +195,7 @@ IPC_Client::init (int argc, char *argv[]) SH *sh; - ACE_NEW_RETURN (sh, SH (this->reactor ()), -1) + ACE_NEW_RETURN (sh, SH (this->reactor ()), -1); // Connect to the peer, reusing the local addr if necessary. if (this->connect (sh, remote_addr, this->options_, local_addr, 1) == -1 -- cgit v1.2.1