diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-12 08:03:36 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-12 08:03:36 +0000 |
commit | 36e0b5418b85eb3cd97023ed8273b0a5564d5ac1 (patch) | |
tree | ef850caa3e4b4b4d5555a8ff50d45eea0deed4c3 | |
parent | d7f616afacbbaaae2938c74615931aee13d99eeb (diff) | |
download | ATCD-36e0b5418b85eb3cd97023ed8273b0a5564d5ac1.tar.gz |
foo
-rw-r--r-- | ChangeLog-96b | 21 | ||||
-rw-r--r-- | ace/OS.h | 3 | ||||
-rw-r--r-- | ace/OS.i | 2 | ||||
-rw-r--r-- | ace/Synch_T.h | 7 | ||||
-rw-r--r-- | tests/Buffer_Stream_Test.cpp | 3 | ||||
-rw-r--r-- | tests/TSS_Test.cpp | 38 | ||||
-rw-r--r-- | tests/TSS_Test_Errno.h | 46 | ||||
-rw-r--r-- | tests/run_tests.bat | 2 |
8 files changed, 81 insertions, 41 deletions
diff --git a/ChangeLog-96b b/ChangeLog-96b index a6b20c7fe98..9402d89e58f 100644 --- a/ChangeLog-96b +++ b/ChangeLog-96b @@ -1,3 +1,20 @@ +Wed Dec 11 20:33:28 1996 Douglas C. Schmidt <schmidt@lindy.cs.wustl.edu> + + * ace/Synch_T.h: Added a warning that indicates why it isn't + possible to use ACE_Process_Condition<ACE_Process_Mutex> on + Win32... + + * tests/TSS_Test.cpp: Moved the Errno class to a file + TSS_Test_Errno.h and replaced the Errno class with the #include + "TSS_Test_Errno.h" to work around "features" with AIX C++'s + template instantiation scheme. + + * ace/OS.i (inet_aton): Replaced the use of ((ACE_UINT32) -1) with + ((ACE_UINT32) ~0). I expect this is more portable... + + * tests/run_tests.bat: Added "Service_Config_Test" to the + run_tests.bat file. + Tue Dec 10 22:59:26 1996 Irfan Pyarali <irfan@flamenco.cs.wustl.edu> * tests: Added Service_Config_Test to Win32 makefiles. @@ -21,6 +38,10 @@ Tue Dec 10 22:59:26 1996 Irfan Pyarali <irfan@flamenco.cs.wustl.edu> Tue Dec 10 00:33:08 1996 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + * tests/Service_Config_Test.cpp (main): Added a new method called + run_test() to ensure that ACE_Service_Config daemon is destroyed + before we try to end the test. + * ace/OS.i (inet_aton): We need to cast -1 to (ACE_UINT32). * tests/Process_Mutex_Test.cpp (main): Added a minor change to @@ -2419,6 +2419,8 @@ private: if (POINTER == 0) { errno = ENOMEM; return; } \ } while (0) +<<<<<<< OS.h +======= #define ACE_DEFAULT_MUTEX_A "ACE_MUTEX" @@ -2442,6 +2444,7 @@ private: #endif /* UNICODE */ +>>>>>>> 4.37 #if defined (UNICODE) #include "ace/SString.h" #define ACE_WIDE_STRING(ASCII) \ @@ -2589,7 +2589,7 @@ ACE_INLINE int ACE_OS::inet_aton (const char *host_name, struct in_addr *addr) { long ip_addr = ACE_OS::inet_addr (host_name); - if (ip_addr == (long) htonl ((ACE_UINT32) -1) + if (ip_addr == (long) htonl ((ACE_UINT32) ~0) // Broadcast addresses are weird... && ACE_OS::strcmp (host_name, "255.255.255.255") != 0) return 0; diff --git a/ace/Synch_T.h b/ace/Synch_T.h index 1353bcf7b88..bac1335fefb 100644 --- a/ace/Synch_T.h +++ b/ace/Synch_T.h @@ -555,6 +555,13 @@ template <class MUTEX> class ACE_Process_Condition : public ACE_Condition<MUTEX> // = TITLE // ACE_Condition variable wrapper that works across processes. + // + // = DESCRIPTION + // Note that this implementation only works on OS platforms + // (e.g., Solaris and some implementations of POSIX pthreads) + // that natively implement condition variables and mutexes with + // USYNC_PROCESS scope. In particular, this won't work on + // Win32, where these synchronization mechanisms are emulated. { public: ACE_Process_Condition (MUTEX &m, LPCTSTR name = 0, void *arg = 0); diff --git a/tests/Buffer_Stream_Test.cpp b/tests/Buffer_Stream_Test.cpp index bce8c31b266..a228d94e783 100644 --- a/tests/Buffer_Stream_Test.cpp +++ b/tests/Buffer_Stream_Test.cpp @@ -227,6 +227,3 @@ main (int, char *[]) ACE_END_TEST; return 0; } - - - diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp index 0642f84e2ba..724f1c322b0 100644 --- a/tests/TSS_Test.cpp +++ b/tests/TSS_Test.cpp @@ -22,6 +22,7 @@ #include "ace/Service_Config.h" #include "ace/Synch.h" +#include "TSS_Test_Errno.h" #include "test_config.h" #if defined (ACE_HAS_THREADS) @@ -29,43 +30,6 @@ static const int ITERATIONS = 100; -class Errno -{ -public: - int error (void) { return this->errno_; } - void error (int i) { this->errno_ = i; } - - int line (void) { return this->lineno_; } - void line (int l) { this->lineno_ = l; } - - // Errno::flags_ is a static variable, so we've got to protect it - // with a mutex since it isn't kept in thread-specific storage. - int flags (void) { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_Mon, Errno::lock_, -1)); - - return Errno::flags_; - } - int flags (int f) - { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1)); - - Errno::flags_ = f; - return 0; - } - -private: - // = errno_ and lineno_ will be thread-specific data so they don't - // need a lock. - int errno_; - int lineno_; - - static int flags_; -#if defined (ACE_HAS_THREADS) - // flags_ needs a lock. - static ACE_Thread_Mutex lock_; -#endif /* ACE_HAS_THREADS */ -}; - // Static variables. ACE_MT (ACE_Thread_Mutex Errno::lock_); int Errno::flags_; diff --git a/tests/TSS_Test_Errno.h b/tests/TSS_Test_Errno.h new file mode 100644 index 00000000000..09aeec79f4d --- /dev/null +++ b/tests/TSS_Test_Errno.h @@ -0,0 +1,46 @@ +class Errno +// ============================================================================ +// = TITLE +// Define a simple Errno abstraction +// +// = DESCRIPTION +// This class gets its own header file to work around AIX C++ +// compiler "features" related to template instantiation... It is +// only used by TSS_Test.cpp +// ============================================================================ +{ +public: + int error (void) { return this->errno_; } + void error (int i) { this->errno_ = i; } + + int line (void) { return this->lineno_; } + void line (int l) { this->lineno_ = l; } + + // Errno::flags_ is a static variable, so we've got to protect it + // with a mutex since it isn't kept in thread-specific storage. + int flags (void) { + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_Mon, Errno::lock_, -1)); + + return Errno::flags_; + } + int flags (int f) + { + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1)); + + Errno::flags_ = f; + return 0; + } + +private: + // = errno_ and lineno_ will be thread-specific data so they don't + // need a lock. + int errno_; + int lineno_; + + static int flags_; +#if defined (ACE_HAS_THREADS) + // flags_ needs a lock. + static ACE_Thread_Mutex lock_; +#endif /* ACE_HAS_THREADS */ +}; + diff --git a/tests/run_tests.bat b/tests/run_tests.bat index 3419d714c00..b8fe7f03160 100644 --- a/tests/run_tests.bat +++ b/tests/run_tests.bat @@ -12,6 +12,7 @@ Map_Manager_Test Mem_Map_Test Message_Queue_Test MM_Shared_Memory_Test +@echo The following test runs for about 1 minute Mutex_Test Naming_Test Pipe_Test @@ -21,6 +22,7 @@ Reactor_Timer_Test Reactors_Test Reader_Writer_Test Recursive_Mutex_Test +Service_Config_Test SPIPE_Test SString_Test SV_Shared_Memory_Test |