blob: fe6f3a39c3275167bd0e13eb41789d055b88dcad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
$NetBSD: patch-ae,v 1.2 2009/03/18 11:57:16 jmcneill Exp $
--- src/ptlib/common/osutils.cxx.orig 2009-03-17 23:43:33.000000000 -0400
+++ src/ptlib/common/osutils.cxx
@@ -1548,7 +1548,7 @@ PProcess::PProcess(const char * manuf, c
, m_library(false)
{
activeThreads.DisallowDeleteObjects();
- activeThreads.SetAt((PINDEX)GetCurrentThreadId(), this);
+ activeThreads.SetAt((uintptr_t)GetCurrentThreadId(), this);
PProcessInstance = this;
@@ -1912,7 +1912,7 @@ PThread * PThread::Current()
PProcess & process = PProcess::Current();
process.activeThreadMutex.Wait();
- PThread * thread = process.activeThreads.GetAt((unsigned)GetCurrentThreadId());
+ PThread * thread = process.activeThreads.GetAt((uintptr_t)GetCurrentThreadId());
process.activeThreadMutex.Signal();
if (thread == NULL)
@@ -2210,21 +2210,21 @@ PReadWriteMutex::~PReadWriteMutex()
PReadWriteMutex::Nest * PReadWriteMutex::GetNest() const
{
PWaitAndSignal mutex(nestingMutex);
- return nestedThreads.GetAt(POrdinalKey((PINDEX)PThread::GetCurrentThreadId()));
+ return nestedThreads.GetAt(POrdinalKey((INT)PThread::GetCurrentThreadId()));
}
void PReadWriteMutex::EndNest()
{
nestingMutex.Wait();
- nestedThreads.RemoveAt(POrdinalKey((PINDEX)PThread::GetCurrentThreadId()));
+ nestedThreads.RemoveAt(POrdinalKey((INT)PThread::GetCurrentThreadId()));
nestingMutex.Signal();
}
PReadWriteMutex::Nest & PReadWriteMutex::StartNest()
{
- POrdinalKey threadId = (PINDEX)PThread::GetCurrentThreadId();
+ POrdinalKey threadId = (INT)PThread::GetCurrentThreadId();
nestingMutex.Wait();
|