thread.c (647f063d) | thread.c (c99cd5fc) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 25#include "system.h" 26 27#include <osl/diagnose.h> 28#include <osl/thread.h> 29#include <osl/time.h> 30#include <rtl/alloc.h> 31#include <rtl/tencinfo.h> 32 | 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 --- 16 unchanged lines hidden (view full) --- 25#include "system.h" 26 27#include <osl/diagnose.h> 28#include <osl/thread.h> 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 |
|
33/* 34 Thread-data structure hidden behind oslThread: 35*/ 36typedef struct _osl_TThreadImpl 37{ 38 39 TID m_ThreadId; /* identifier for this thread */ 40 sal_Int32 m_Flags; --- 47 unchanged lines hidden (view full) --- 88 89/*****************************************************************************/ 90/* oslWorkerWrapperFunction */ 91/*****************************************************************************/ 92static void oslWorkerWrapperFunction(void* pData) 93{ 94 BOOL rc; 95 osl_TThreadImpl* pThreadImpl= (osl_TThreadImpl*)pData; | 40/* 41 Thread-data structure hidden behind oslThread: 42*/ 43typedef struct _osl_TThreadImpl 44{ 45 46 TID m_ThreadId; /* identifier for this thread */ 47 sal_Int32 m_Flags; --- 47 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; |
103 EXCEPTIONREGISTRATIONRECORD exRegRec = {0}; 104 LoadExceptq(&exRegRec, NULL, NULL); |
|
96 97#if OSL_DEBUG_LEVEL>0 98printf("oslWorkerWrapperFunction pThreadImpl %x, pThreadImpl->m_ThreadId %d\n", pThreadImpl, pThreadImpl->m_ThreadId); 99#endif 100 /* Inizialize PM for this thread */ 101 pThreadImpl->m_hab = WinInitialize( 0 ); 102#if OSL_DEBUG_LEVEL>0 103printf("pThreadImpl->m_ThreadId %d, pThreadImpl->m_hab %x\n", pThreadImpl->m_ThreadId,pThreadImpl->m_hab); --- 13 unchanged lines hidden (view full) --- 117 rc = WinDestroyMsgQueue( pThreadImpl->m_hmq ); 118#if OSL_DEBUG_LEVEL>0 119printf("pThreadImpl->m_ThreadId %d, WinDestroyMsgQueue rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc); 120printf("pThreadImpl->m_ThreadId %d, about to terminate hab\n", pThreadImpl->m_ThreadId); 121#endif 122 rc = WinTerminate( pThreadImpl->m_hab ); 123#if OSL_DEBUG_LEVEL>0 124printf("pThreadImpl->m_ThreadId %d, WinTerminate rc=%d (should be 1)\n", pThreadImpl->m_ThreadId, rc); | 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); --- 13 unchanged lines hidden (view full) --- 126 rc = WinDestroyMsgQueue( pThreadImpl->m_hmq ); 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 135 UninstallExceptq(&exRegRec); 136 |
|
125#endif 126} 127 128 129/*****************************************************************************/ 130/* oslCreateThread */ 131/*****************************************************************************/ 132static oslThread oslCreateThread(oslWorkerFunction pWorker, --- 640 unchanged lines hidden --- | 137#endif 138} 139 140 141/*****************************************************************************/ 142/* oslCreateThread */ 143/*****************************************************************************/ 144static oslThread oslCreateThread(oslWorkerFunction pWorker, --- 640 unchanged lines hidden --- |