Lines Matching refs:pThreadImpl

67     osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)hThread;  in osl_getPMinternal_HAB()  local
69 if(pThreadImpl == NULL) /* valid ptr? */ in osl_getPMinternal_HAB()
75 return pThreadImpl->m_hab; in osl_getPMinternal_HAB()
81 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)hThread; in osl_getPMinternal_HMQ() local
83 if(pThreadImpl == NULL) /* valid ptr? */ in osl_getPMinternal_HMQ()
89 return pThreadImpl->m_hmq; in osl_getPMinternal_HMQ()
100 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)pData; in oslWorkerWrapperFunction() local
103 …rWrapperFunction pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_Thread… in oslWorkerWrapperFunction()
106 pThreadImpl->m_hab = WinInitialize( 0 ); in oslWorkerWrapperFunction()
108 printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hab %x\n", pThreadImpl->m_ThreadId,pThreadImpl->… in oslWorkerWrapperFunction()
110 pThreadImpl->m_hmq = WinCreateMsgQueue( pThreadImpl->m_hab, 0 ); in oslWorkerWrapperFunction()
112 printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hmq %x\n", pThreadImpl->m_ThreadId,pThreadImpl->… in oslWorkerWrapperFunction()
116 pThreadImpl->m_WorkerFunction( pThreadImpl->m_pData ); in oslWorkerWrapperFunction()
120 printf("pThreadImpl->m_ThreadId %d, about to destroy queue\n", pThreadImpl->m_ThreadId); in oslWorkerWrapperFunction()
122 rc = WinDestroyMsgQueue( pThreadImpl->m_hmq ); in oslWorkerWrapperFunction()
124 printf("pThreadImpl->m_ThreadId %d, WinDestroyMsgQueue rc=%d (should be 1)\n", pThreadImpl->m_Threa… in oslWorkerWrapperFunction()
125 printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_ThreadId); in oslWorkerWrapperFunction()
127 rc = WinTerminate( pThreadImpl->m_hab ); in oslWorkerWrapperFunction()
129 printf("pThreadImpl->m_ThreadId %d, WinTerminate rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, r… in oslWorkerWrapperFunction()
142 osl_TThreadImpl* pThreadImpl; in oslCreateThread() local
145 pThreadImpl = (osl_TThreadImpl*)malloc(sizeof(osl_TThreadImpl)); in oslCreateThread()
147 OSL_ASSERT(pThreadImpl); in oslCreateThread()
149 pThreadImpl->m_WorkerFunction= pWorker; in oslCreateThread()
150 pThreadImpl->m_pData= pThreadData; in oslCreateThread()
152 pThreadImpl->m_Flags = 0; in oslCreateThread()
153 pThreadImpl->m_hEvent = 0; in oslCreateThread()
154 pThreadImpl->m_Timeout = 0; in oslCreateThread()
155 pThreadImpl->m_StartSuspended = nFlags; in oslCreateThread()
156 pThreadImpl->m_hab = 0; in oslCreateThread()
157 pThreadImpl->m_hmq = 0; in oslCreateThread()
164 pThreadImpl->m_ThreadId = (TID) _beginthread( oslWorkerWrapperFunction, /* worker-function */ in oslCreateThread()
167 pThreadImpl ); in oslCreateThread()
170 if( pThreadImpl->m_ThreadId != -1 ) in oslCreateThread()
171 DosSuspendThread( pThreadImpl->m_ThreadId ); in oslCreateThread()
175 printf("oslCreateThread pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_… in oslCreateThread()
177 if(pThreadImpl->m_ThreadId == -1) in oslCreateThread()
180 if (pThreadImpl->m_hEvent != 0) in oslCreateThread()
181 DosCloseEventSem(pThreadImpl->m_hEvent); in oslCreateThread()
183 free(pThreadImpl); in oslCreateThread()
187 pThreadImpl->m_hEvent= 0; in oslCreateThread()
189 return pThreadImpl; in oslCreateThread()
216 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_getThreadIdentifier() local
218 if (pThreadImpl != NULL) in osl_getThreadIdentifier()
219 return ((oslThreadIdentifier)pThreadImpl->m_ThreadId); in osl_getThreadIdentifier()
235 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_destroyThread() local
243 if(pThreadImpl->m_ThreadId != -1) /* valid handle ? */ in osl_destroyThread()
246 DosKillThread( pThreadImpl->m_ThreadId ); in osl_destroyThread()
255 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_freeThreadHandle() local
263 if (pThreadImpl->m_hEvent != 0) in osl_freeThreadHandle()
264 DosCloseEventSem(pThreadImpl->m_hEvent); in osl_freeThreadHandle()
275 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_resumeThread() local
277 OSL_ASSERT(pThreadImpl); /* valid ptr? */ in osl_resumeThread()
279 DosResumeThread( pThreadImpl->m_ThreadId ); in osl_resumeThread()
287 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_suspendThread() local
289 OSL_ASSERT(pThreadImpl); /* valid ptr? */ in osl_suspendThread()
291 DosSuspendThread( pThreadImpl->m_ThreadId ); in osl_suspendThread()
302 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_setThreadPriority() local
304 OSL_ASSERT(pThreadImpl); /* valid ptr? */ in osl_setThreadPriority()
353 pThreadImpl->m_ThreadId ); in osl_setThreadPriority()
371 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_getThreadPriority() local
374 if(pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1) in osl_getThreadPriority()
444 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_isThreadRunning() local
448 if(pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1) in osl_isThreadRunning()
456 rc = DosWaitThread( &pThreadImpl->m_ThreadId, DCWW_NOWAIT ); in osl_isThreadRunning()
466 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_joinWithThread() local
469 if(pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1) in osl_joinWithThread()
475 DosWaitThread( &pThreadImpl->m_ThreadId, DCWW_WAIT ); in osl_joinWithThread()
497 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_terminateThread() local
500 if (pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1) in osl_terminateThread()
507 pThreadImpl->m_Flags |= THREADIMPL_FLAGS_TERMINATE; in osl_terminateThread()
517 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)Thread; in osl_scheduleThread() local
522 if (pThreadImpl==NULL || pThreadImpl->m_ThreadId==-1) in osl_scheduleThread()
528 if (pThreadImpl->m_Flags & THREADIMPL_FLAGS_SLEEP) in osl_scheduleThread()
530 OSL_ASSERT (pThreadImpl->m_hEvent != 0); in osl_scheduleThread()
532 DosWaitEventSem(pThreadImpl->m_hEvent, pThreadImpl->m_Timeout); in osl_scheduleThread()
536 pThreadImpl->m_Timeout = 0; in osl_scheduleThread()
538 pThreadImpl->m_Flags &= ~THREADIMPL_FLAGS_SLEEP; in osl_scheduleThread()
543 return ((pThreadImpl->m_Flags & THREADIMPL_FLAGS_TERMINATE) == 0); in osl_scheduleThread()