Lines Matching refs:pThreadImpl

69     osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)hThread;  in osl_getPMinternal_HAB()  local
71 if(pThreadImpl == NULL) /* valid ptr? */ in osl_getPMinternal_HAB()
77 return pThreadImpl->m_hab; in osl_getPMinternal_HAB()
83 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)hThread; in osl_getPMinternal_HMQ() local
85 if(pThreadImpl == NULL) /* valid ptr? */ in osl_getPMinternal_HMQ()
91 return pThreadImpl->m_hmq; in osl_getPMinternal_HMQ()
102 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)pData; in oslWorkerWrapperFunction() local
107 …rWrapperFunction pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_Thread… in oslWorkerWrapperFunction()
110 pThreadImpl->m_hab = WinInitialize( 0 ); in oslWorkerWrapperFunction()
112 printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hab %x\n", pThreadImpl->m_ThreadId,pThreadImpl->… in oslWorkerWrapperFunction()
114 pThreadImpl->m_hmq = WinCreateMsgQueue( pThreadImpl->m_hab, 0 ); in oslWorkerWrapperFunction()
116 printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hmq %x\n", pThreadImpl->m_ThreadId,pThreadImpl->… in oslWorkerWrapperFunction()
120 pThreadImpl->m_WorkerFunction( pThreadImpl->m_pData ); in oslWorkerWrapperFunction()
124 printf("pThreadImpl->m_ThreadId %d, about to destroy queue\n", pThreadImpl->m_ThreadId); in oslWorkerWrapperFunction()
126 rc = WinDestroyMsgQueue( pThreadImpl->m_hmq ); in oslWorkerWrapperFunction()
128 printf("pThreadImpl->m_ThreadId %d, WinDestroyMsgQueue rc=%d (should be 1)\n", pThreadImpl->m_Threa… in oslWorkerWrapperFunction()
129 printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_ThreadId); in oslWorkerWrapperFunction()
131 rc = WinTerminate( pThreadImpl->m_hab ); in oslWorkerWrapperFunction()
133 printf("pThreadImpl->m_ThreadId %d, WinTerminate rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, r… in oslWorkerWrapperFunction()
148 osl_TThreadImpl* pThreadImpl; in oslCreateThread() local
151 pThreadImpl = (osl_TThreadImpl*)malloc(sizeof(osl_TThreadImpl)); in oslCreateThread()
153 OSL_ASSERT(pThreadImpl); in oslCreateThread()
155 pThreadImpl->m_WorkerFunction= pWorker; in oslCreateThread()
156 pThreadImpl->m_pData= pThreadData; in oslCreateThread()
158 pThreadImpl->m_Flags = 0; in oslCreateThread()
159 pThreadImpl->m_hEvent = 0; in oslCreateThread()
160 pThreadImpl->m_Timeout = 0; in oslCreateThread()
161 pThreadImpl->m_StartSuspended = nFlags; in oslCreateThread()
162 pThreadImpl->m_hab = 0; in oslCreateThread()
163 pThreadImpl->m_hmq = 0; in oslCreateThread()
170 pThreadImpl->m_ThreadId = (TID) _beginthread( oslWorkerWrapperFunction, /* worker-function */ in oslCreateThread()
173 pThreadImpl ); in oslCreateThread()
176 if( pThreadImpl->m_ThreadId != -1 ) in oslCreateThread()
177 DosSuspendThread( pThreadImpl->m_ThreadId ); in oslCreateThread()
181 printf("oslCreateThread pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_… in oslCreateThread()
183 if(pThreadImpl->m_ThreadId == -1) in oslCreateThread()
186 if (pThreadImpl->m_hEvent != 0) in oslCreateThread()
187 DosCloseEventSem(pThreadImpl->m_hEvent); in oslCreateThread()
189 free(pThreadImpl); in oslCreateThread()
193 pThreadImpl->m_hEvent= 0; in oslCreateThread()
195 return pThreadImpl; in oslCreateThread()
222 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_getThreadIdentifier() local
224 if (pThreadImpl != NULL) in osl_getThreadIdentifier()
225 return ((oslThreadIdentifier)pThreadImpl->m_ThreadId); in osl_getThreadIdentifier()
241 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_destroyThread() local
249 if(pThreadImpl->m_ThreadId != -1) /* valid handle ? */ in osl_destroyThread()
252 DosKillThread( pThreadImpl->m_ThreadId ); in osl_destroyThread()
261 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_freeThreadHandle() local
269 if (pThreadImpl->m_hEvent != 0) in osl_freeThreadHandle()
270 DosCloseEventSem(pThreadImpl->m_hEvent); in osl_freeThreadHandle()
281 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_resumeThread() local
283 OSL_ASSERT(pThreadImpl); /* valid ptr? */ in osl_resumeThread()
285 DosResumeThread( pThreadImpl->m_ThreadId ); in osl_resumeThread()
293 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_suspendThread() local
295 OSL_ASSERT(pThreadImpl); /* valid ptr? */ in osl_suspendThread()
297 DosSuspendThread( pThreadImpl->m_ThreadId ); in osl_suspendThread()
308 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_setThreadPriority() local
310 OSL_ASSERT(pThreadImpl); /* valid ptr? */ in osl_setThreadPriority()
359 pThreadImpl->m_ThreadId ); in osl_setThreadPriority()
377 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_getThreadPriority() local
380 if(pThreadImpl==0 || pThreadImpl->m_ThreadId==-1) in osl_getThreadPriority()
450 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_isThreadRunning() local
454 if(pThreadImpl==0 || pThreadImpl->m_ThreadId==-1) in osl_isThreadRunning()
462 rc = DosWaitThread( &pThreadImpl->m_ThreadId, DCWW_NOWAIT ); in osl_isThreadRunning()
472 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_joinWithThread() local
475 if(pThreadImpl==0 || pThreadImpl->m_ThreadId==-1) in osl_joinWithThread()
481 DosWaitThread( &pThreadImpl->m_ThreadId, DCWW_WAIT ); in osl_joinWithThread()
503 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_terminateThread() local
506 if (pThreadImpl==0 || pThreadImpl->m_ThreadId==-1) in osl_terminateThread()
513 pThreadImpl->m_Flags |= THREADIMPL_FLAGS_TERMINATE; in osl_terminateThread()
523 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_scheduleThread() local
528 if (pThreadImpl==0 || pThreadImpl->m_ThreadId==-1) in osl_scheduleThread()
534 if (pThreadImpl->m_Flags & THREADIMPL_FLAGS_SLEEP) in osl_scheduleThread()
536 OSL_ASSERT (pThreadImpl->m_hEvent != 0); in osl_scheduleThread()
538 DosWaitEventSem(pThreadImpl->m_hEvent, pThreadImpl->m_Timeout); in osl_scheduleThread()
542 pThreadImpl->m_Timeout = 0; in osl_scheduleThread()
544 pThreadImpl->m_Flags &= ~THREADIMPL_FLAGS_SLEEP; in osl_scheduleThread()
549 return ((pThreadImpl->m_Flags & THREADIMPL_FLAGS_TERMINATE) == 0); in osl_scheduleThread()