diff options
-rw-r--r-- | sal/inc/osl/thread.h | 16 | ||||
-rw-r--r-- | sal/osl/w32/thread.c | 28 |
2 files changed, 16 insertions, 28 deletions
diff --git a/sal/inc/osl/thread.h b/sal/inc/osl/thread.h index a9f308259728..7b33bdce23d2 100644 --- a/sal/inc/osl/thread.h +++ b/sal/inc/osl/thread.h @@ -2,9 +2,9 @@ * * $RCSfile: thread.h,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: obr $ $Date: 2001-05-14 09:46:17 $ + * last change: $Author: jbu $ $Date: 2001-06-08 15:51:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -129,16 +129,16 @@ oslThread SAL_CALL osl_createSuspendedThread(oslWorkerFunction pWorker, void* pT */ oslThreadIdentifier SAL_CALL osl_getThreadIdentifier(oslThread Thread); -/** Forcefully abort the thread, if it is still running. - Then release the OS-structures and our thread data-structure. +/** Release the thread handle. If Thread is NULL, the function won't do anything. + Note that we do not interfere with the actual running of + the thread, we just free up the memory needed by the handle. */ void SAL_CALL osl_destroyThread(oslThread Thread); -/** Release our thread data-structure. - If Thread is NULL, the function won't do anything. - Note that we do not interfere with the actual running of - the thread, we just free up the memory needed by the handle. +/** This method is non-functional. + + @deprecated */ void SAL_CALL osl_freeThreadHandle(oslThread Thread); diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c index 00aea97ef553..29cbc8a20c13 100644 --- a/sal/osl/w32/thread.c +++ b/sal/osl/w32/thread.c @@ -2,9 +2,9 @@ * * $RCSfile: thread.c,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: obr $ $Date: 2001-06-01 15:02:14 $ + * last change: $Author: jbu $ $Date: 2001-06-08 15:46:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -207,11 +207,11 @@ void SAL_CALL osl_destroyThread(oslThread Thread) return; } - if (pThreadImpl->m_hThread != 0) /* valid handle ? */ - { - /* cancel thread */ - TerminateThread(pThreadImpl->m_hThread, 0); - } + /* !!!! _exitthreadex does _not_ call CloseHandle !!! */ + CloseHandle( pThreadImpl->m_hThread ); + + /* free memory */ + free(Thread); } /*****************************************************************************/ @@ -219,19 +219,7 @@ void SAL_CALL osl_destroyThread(oslThread Thread) /*****************************************************************************/ void SAL_CALL osl_freeThreadHandle(oslThread Thread) { - osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; - - if(Thread == 0) /* valid ptr? */ - { - /* thread already destroyed or not created */ - return; - } - - /* !!!! _exitthreadex does _not_ call CloseHandle !!! */ - CloseHandle( pThreadImpl->m_hThread ); - - /* free memory */ - free(Thread); + OSL_ENSURE( 0 , "osl_freeThreadHandle: deprecated, should not be called !" ); } /*****************************************************************************/ |