thread.c (509a48ff) | thread.c (2de5e723) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 20 unchanged lines hidden (view full) --- 29#include <osl/time.h> 30#include <rtl/alloc.h> 31#include <rtl/tencinfo.h> 32 33#define INCL_DOSPROCESS 34#define INCL_DOSEXCEPTIONS 35#define INCL_DOSMODULEMGR 36#include <os2.h> | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 20 unchanged lines hidden (view full) --- 29#include <osl/time.h> 30#include <rtl/alloc.h> 31#include <rtl/tencinfo.h> 32 33#define INCL_DOSPROCESS 34#define INCL_DOSEXCEPTIONS 35#define INCL_DOSMODULEMGR 36#include <os2.h> |
37#define INCL_LOADEXCEPTQ 38#include <exceptq.h> | |
39 40/* 41 Thread-data structure hidden behind oslThread: 42*/ 43typedef struct _osl_TThreadImpl 44{ 45 46 TID m_ThreadId; /* identifier for this thread */ --- 48 unchanged lines hidden (view full) --- 95 96/*****************************************************************************/ 97/* oslWorkerWrapperFunction */ 98/*****************************************************************************/ 99static void oslWorkerWrapperFunction(void* pData) 100{ 101 BOOL rc; 102 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)pData; | 37 38/* 39 Thread-data structure hidden behind oslThread: 40*/ 41typedef struct _osl_TThreadImpl 42{ 43 44 TID m_ThreadId; /* identifier for this thread */ --- 48 unchanged lines hidden (view full) --- 93 94/*****************************************************************************/ 95/* oslWorkerWrapperFunction */ 96/*****************************************************************************/ 97static void oslWorkerWrapperFunction(void* pData) 98{ 99 BOOL rc; 100 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)pData; |
103 EXCEPTIONREGISTRATIONRECORD exRegRec = {0}; 104 LoadExceptq(&exRegRec, NULL, NULL); | |
105 106#if OSL_DEBUG_LEVEL>0 107printf("oslWorkerWrapperFunction pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_ThreadId); 108#endif 109 /* Inizialize PM for this thread */ 110 pThreadImpl->m_hab = WinInitialize( 0 ); 111#if OSL_DEBUG_LEVEL>0 112printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hab %x\n", pThreadImpl->m_ThreadId,pThreadImpl->m_hab); --- 14 unchanged lines hidden (view full) --- 127#if OSL_DEBUG_LEVEL>0 128printf("pThreadImpl->m_ThreadId %d, WinDestroyMsgQueue rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc); 129printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_ThreadId); 130#endif 131 rc = WinTerminate( pThreadImpl->m_hab ); 132#if OSL_DEBUG_LEVEL>0 133printf("pThreadImpl->m_ThreadId %d, WinTerminate rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc); 134 | 101 102#if OSL_DEBUG_LEVEL>0 103printf("oslWorkerWrapperFunction pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_ThreadId); 104#endif 105 /* Inizialize PM for this thread */ 106 pThreadImpl->m_hab = WinInitialize( 0 ); 107#if OSL_DEBUG_LEVEL>0 108printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hab %x\n", pThreadImpl->m_ThreadId,pThreadImpl->m_hab); --- 14 unchanged lines hidden (view full) --- 123#if OSL_DEBUG_LEVEL>0 124printf("pThreadImpl->m_ThreadId %d, WinDestroyMsgQueue rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc); 125printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_ThreadId); 126#endif 127 rc = WinTerminate( pThreadImpl->m_hab ); 128#if OSL_DEBUG_LEVEL>0 129printf("pThreadImpl->m_ThreadId %d, WinTerminate rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc); 130 |
135 UninstallExceptq(&exRegRec); 136 | |
137#endif 138} 139 140 141/*****************************************************************************/ 142/* oslCreateThread */ 143/*****************************************************************************/ 144static oslThread oslCreateThread(oslWorkerFunction pWorker, --- 640 unchanged lines hidden --- | 131#endif 132} 133 134 135/*****************************************************************************/ 136/* oslCreateThread */ 137/*****************************************************************************/ 138static oslThread oslCreateThread(oslWorkerFunction pWorker, --- 640 unchanged lines hidden --- |