diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-15 16:38:54 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-12-15 16:38:54 +0000 |
commit | b134be83f52912e4e7e3707973a1e24b29d48552 (patch) | |
tree | 5c7b58240f4d2ab28cec729bb1b7d46a5d01f47f /tests | |
parent | 0d7dedcc81b518738ba0a19347394816bd262322 (diff) | |
download | ATCD-b134be83f52912e4e7e3707973a1e24b29d48552.tar.gz |
*** empty log message ***
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Buffer_Stream_Test.cpp | 6 | ||||
-rw-r--r-- | tests/Future_Test.cpp | 8 | ||||
-rw-r--r-- | tests/Priority_Task_Test.cpp | 3 | ||||
-rw-r--r-- | tests/Reactors_Test.cpp | 7 | ||||
-rw-r--r-- | tests/Task_Test.cpp | 5 | ||||
-rw-r--r-- | tests/Thread_Pool_Test.cpp | 2 | ||||
-rw-r--r-- | tests/UPIPE_SAP_Test.cpp | 26 | ||||
-rwxr-xr-x | tests/run_tests.sh | 2 |
8 files changed, 14 insertions, 45 deletions
diff --git a/tests/Buffer_Stream_Test.cpp b/tests/Buffer_Stream_Test.cpp index a228d94e783..aa5ec27414c 100644 --- a/tests/Buffer_Stream_Test.cpp +++ b/tests/Buffer_Stream_Test.cpp @@ -46,12 +46,6 @@ public: // ACE_Task hooks virtual int open (void * = 0); virtual int close (u_long = 0); - virtual int put (ACE_Message_Block *, ACE_Time_Value * = 0) { return 0; } - - // ACE_Service_Object hooks - virtual int init (int, char **) { return 0; } - virtual int fini (void) { return 0; } - virtual int info (char **, size_t) const { return 0; } }; // Define the Producer interface. diff --git a/tests/Future_Test.cpp b/tests/Future_Test.cpp index 00ed154ebbf..8207ede913c 100644 --- a/tests/Future_Test.cpp +++ b/tests/Future_Test.cpp @@ -58,7 +58,6 @@ public: virtual int open (void *args = 0); virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0); virtual int svc (void); ACE_Future<double> work (double param, int count); @@ -196,13 +195,6 @@ Scheduler::close (u_long) return 0; } -// put... ?? -int -Scheduler::put (ACE_Message_Block *, ACE_Time_Value *) -{ - return 0; -} - // service.. int Scheduler::svc (void) diff --git a/tests/Priority_Task_Test.cpp b/tests/Priority_Task_Test.cpp index 5444e5b987c..bcc52856f43 100644 --- a/tests/Priority_Task_Test.cpp +++ b/tests/Priority_Task_Test.cpp @@ -29,7 +29,6 @@ class Priority_Task : public ACE_Task<ACE_MT_SYNCH> public: Priority_Task (void); - int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } int close (u_long = 0); int open (void *); int svc (void); @@ -65,7 +64,7 @@ Priority_Task::svc (void) ACE_hthread_t thr_handle; ACE_Thread::self (thr_handle); int prio; - ACE_Thread::getprio (thr_handle, &prio); + ACE_Thread::getprio (thr_handle, prio); ACE_ASSERT (this->priority_ == prio); return 0; } diff --git a/tests/Reactors_Test.cpp b/tests/Reactors_Test.cpp index 8bad943910d..2c459cdbf15 100644 --- a/tests/Reactors_Test.cpp +++ b/tests/Reactors_Test.cpp @@ -36,7 +36,6 @@ public: virtual int open (void *args = 0); virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); virtual int svc (void); virtual int handle_input (ACE_HANDLE handle); @@ -97,12 +96,6 @@ Test_Task::close (u_long) } int -Test_Task::put (ACE_Message_Block *, ACE_Time_Value *) -{ - return 0; -} - -int Test_Task::svc (void) { ACE_NEW_THREAD; diff --git a/tests/Task_Test.cpp b/tests/Task_Test.cpp index be1256c3023..27c4d1bd98e 100644 --- a/tests/Task_Test.cpp +++ b/tests/Task_Test.cpp @@ -43,11 +43,6 @@ private: int n_iterations_; // Number of iterations to run. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } }; Barrier_Task::Barrier_Task (ACE_Thread_Manager *thr_mgr, diff --git a/tests/Thread_Pool_Test.cpp b/tests/Thread_Pool_Test.cpp index cb7d9069b9a..2363850e7f3 100644 --- a/tests/Thread_Pool_Test.cpp +++ b/tests/Thread_Pool_Test.cpp @@ -41,7 +41,7 @@ public: // Iterate <n_iterations> time printing off a message and "waiting" // for all other threads to complete this iteration. - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv=0); + virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0); // This allows the producer to pass messages to the <Thread_Pool>. private: diff --git a/tests/UPIPE_SAP_Test.cpp b/tests/UPIPE_SAP_Test.cpp index f1036c563cf..64a851c28bf 100644 --- a/tests/UPIPE_SAP_Test.cpp +++ b/tests/UPIPE_SAP_Test.cpp @@ -100,17 +100,6 @@ acceptor (void *args) ACE_UPIPE_Acceptor *acceptor = (ACE_UPIPE_Acceptor *) args; ACE_UPIPE_Stream s_stream; - ACE_hthread_t thr_handle; - - // Spawn a connector thread. - if (ACE_Thread::spawn (ACE_THR_FUNC (connector), - (void *) 0, - THR_NEW_LWP | THR_DETACHED, - 0, - &thr_handle) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 0); - - ACE_DEBUG ((LM_DEBUG, "(%t) acceptor starting accept\n")); if (acceptor->accept (s_stream) == -1) ACE_DEBUG ((LM_DEBUG, @@ -163,7 +152,7 @@ main (int, char *[]) // Spawn a acceptor thread. if (ACE_Thread::spawn (ACE_THR_FUNC (acceptor), (void *) &acc, - THR_NEW_LWP | THR_DETACHED, + THR_NEW_LWP, 0, &thr_handle_acceptor) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); @@ -171,15 +160,22 @@ main (int, char *[]) // Spawn a connector thread. if (ACE_Thread::spawn (ACE_THR_FUNC (connector), (void *) 0, - THR_NEW_LWP | THR_DETACHED, + THR_NEW_LWP, 0, &thr_handle_connector) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); // Wait for both the acceptor and connector threads to exit. - ACE_Thread::join (thr_handle_connector); - ACE_Thread::join (thr_handle_acceptor); + if (ACE_Thread::join (thr_handle_connector) == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "join"), -1); + else + ACE_DEBUG ((LM_DEBUG, "(%t) joined with connector thread\n")); + if (ACE_Thread::join (thr_handle_acceptor) == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "join"), -1); + else + ACE_DEBUG ((LM_DEBUG, "(%t) joined with acceptor thread\n")); + #else ACE_ERROR ((LM_ERROR, "threads and/or UPIPE not supported on this platform\n")); #endif /* ACE_HAS_THREADS */ diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 92ac675fa09..830260bbb6c 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -66,7 +66,7 @@ run Reader_Writer_Test # uses Thread_Manager, Mutex # ifdef ACE_HAS_STREAM_PIPES run SPIPE_Test # uses SPIPE_Acceptor/Connector, Thread_Manager -# run UPIPE_SAP_Test # uses UPIPE, Thread, Thread_Manager +run UPIPE_SAP_Test # uses UPIPE, Thread, Thread_Manager run Barrier_Test # uses Service_Config, Barrier run Buffer_Stream_Test # uses Service_Config, Module (Stream,Task, Message_Queue) |