diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-11-05 20:18:01 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1996-11-05 20:18:01 +0000 |
commit | c87d117e910439647216b8f41696eb5c67206c5b (patch) | |
tree | 976baf8fd05c5df0383cfd4af38c9076aa4f0247 /ace | |
parent | cc36b64b5fcbe39714f1d6ee5d474108e594b5ea (diff) | |
download | ATCD-c87d117e910439647216b8f41696eb5c67206c5b.tar.gz |
I should be committed!
Diffstat (limited to 'ace')
-rw-r--r-- | ace/Malloc_T.cpp | 4 | ||||
-rw-r--r-- | ace/OS.cpp | 2 | ||||
-rw-r--r-- | ace/Strategies.cpp | 2 | ||||
-rw-r--r-- | ace/Thread_Manager.h | 11 | ||||
-rw-r--r-- | ace/Thread_Manager.i | 9 |
5 files changed, 22 insertions, 6 deletions
diff --git a/ace/Malloc_T.cpp b/ace/Malloc_T.cpp index 0ff5509338e..ace2eb0717f 100644 --- a/ace/Malloc_T.cpp +++ b/ace/Malloc_T.cpp @@ -521,8 +521,8 @@ template <ACE_MEM_POOL_1, class LOCK> ACE_Malloc_Iterator<ACE_MEM_POOL_2, LOCK>::ACE_Malloc_Iterator (ACE_Malloc<ACE_MEM_POOL_2, LOCK> &malloc, const char *name) : malloc_ (malloc), - guard_ (malloc_.lock_), curr_ (0), + guard_ (malloc_.lock_), name_ (name != 0 ? ACE_OS::strdup (name) : 0) { ACE_TRACE ("ACE_Malloc_Iterator<ACE_MEM_POOL_2, LOCK>::ACE_Malloc_Iterator"); @@ -542,7 +542,7 @@ ACE_Malloc_Iterator<ACE_MEM_POOL_2, LOCK>::~ACE_Malloc_Iterator (void) template <ACE_MEM_POOL_1, class LOCK> int ACE_Malloc_Iterator<ACE_MEM_POOL_2, LOCK>::next (void *&next_entry, - char *&name) + char *&name) { ACE_TRACE ("ACE_Malloc_Iterator<ACE_MEM_POOL_2, LOCK>::next"); diff --git a/ace/OS.cpp b/ace/OS.cpp index 7cf2759f637..ceb87dcd53f 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -825,7 +825,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func, // Close down the handle if no one wants to use it. if (thr_handle == &handle) - ::CloseHandle (thr_handle); + ::CloseHandle (handle); if (*thr_handle != 0) return 0; diff --git a/ace/Strategies.cpp b/ace/Strategies.cpp index 34e90c9ace8..6fe39d9e29f 100644 --- a/ace/Strategies.cpp +++ b/ace/Strategies.cpp @@ -291,7 +291,7 @@ ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler { ACE_TRACE ("ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::accept_svc_handler"); - if (this->peer_acceptor_.accept (*svc_handler) == -1) + if (this->peer_acceptor_.accept (svc_handler->peer ()) == -1) { svc_handler->close (0); return -1; diff --git a/ace/Thread_Manager.h b/ace/Thread_Manager.h index e092a477135..dfa1396f468 100644 --- a/ace/Thread_Manager.h +++ b/ace/Thread_Manager.h @@ -138,8 +138,15 @@ public: // on success and -1 if not found. int thr_self (ACE_hthread_t &); - // Passes out the "real" handle to the thread, caching it if - // necessary in TSS to speed up subsequent lookups. + // Passes out the "real" handle to the calling thread, caching it if + // necessary in TSS to speed up subsequent lookups. This is + // necessary since on some platforms (e.g., Win32) we can't get this + // handle via direct method calls. + + ACE_thread_t thr_self (void); + // Return the unique ID of the thread. This is not strictly + // necessary (because a thread can always just call + // <ACE_Thread::thr_self>). However, we put it here to be complete. // = Suspend methods, which isn't supported on POSIX pthreads (will not block). int suspend_all (void); diff --git a/ace/Thread_Manager.i b/ace/Thread_Manager.i index 97a8653e21b..1aa9341a0e0 100644 --- a/ace/Thread_Manager.i +++ b/ace/Thread_Manager.i @@ -77,3 +77,12 @@ ACE_Thread_Control::thr_mgr (ACE_Thread_Manager *tm) return this->tm_ = tm; return o_tm; } + +// Return the unique ID of the thread. + +ACE_INLINE ACE_hthread_t +ACE_Thread_Manager::thr_self (void) +{ + ACE_TRACE ("ACE_Thread_Manager::thr_self"); + return ACE_Thread::self (); +} |