|
Lines 1-5
Link Here
|
| 1 |
--- include/ptlib/unix/ptlib/contain.h.orig 2009-04-25 21:59:44.000000000 +0400 |
1 |
--- include/ptlib/unix/ptlib/contain.h.orig 2009-08-29 14:52:29.000000000 +0400 |
| 2 |
+++ include/ptlib/unix/ptlib/contain.h 2009-04-25 22:01:14.000000000 +0400 |
2 |
+++ include/ptlib/unix/ptlib/contain.h 2009-08-29 14:52:33.000000000 +0400 |
| 3 |
@@ -81,9 +81,11 @@ |
3 |
@@ -81,9 +81,11 @@ |
| 4 |
#ifdef P_64BIT |
4 |
#ifdef P_64BIT |
| 5 |
typedef long INT; |
5 |
typedef long INT; |
|
Lines 12-31
Link Here
|
| 12 |
#endif |
12 |
#endif |
| 13 |
|
13 |
|
| 14 |
// Create "Windows" style definitions. |
14 |
// Create "Windows" style definitions. |
| 15 |
--- src/ptlib/unix/tlib.cxx 2009-03-18 06:43:30.000000000 +0300 |
15 |
--- src/ptlib/unix/tlib.cxx.orig 2009-08-29 15:51:42.000000000 +0400 |
| 16 |
+++ src/ptlib/unix/tlib.cxx 2009-04-25 22:03:56.000000000 +0400 |
16 |
+++ src/ptlib/unix/tlib.cxx 2009-08-29 15:51:45.000000000 +0400 |
| 17 |
@@ -400,7 +404,7 @@ |
17 |
@@ -400,7 +400,7 @@ |
| 18 |
{ |
18 |
{ |
| 19 |
if (PProcessInstance != NULL) { |
19 |
if (PProcessInstance != NULL) { |
| 20 |
PWaitAndSignal m(PProcessInstance->activeThreadMutex); |
20 |
PWaitAndSignal m(PProcessInstance->activeThreadMutex); |
| 21 |
- PThread & thread = PProcessInstance->activeThreads[(unsigned)id]; |
21 |
- PThread & thread = PProcessInstance->activeThreads[(uintptr_t)id]; |
| 22 |
+ PThread & thread = PProcessInstance->activeThreads[_hptr(id)]; |
22 |
+ PThread & thread = PProcessInstance->activeThreads[_hptr(id)]; |
| 23 |
return thread.GetThreadName(); |
23 |
return thread.GetThreadName(); |
| 24 |
} |
24 |
} |
| 25 |
return psprintf("%08x", id); |
25 |
return psprintf("%08x", id); |
| 26 |
--- src/ptlib/unix/tlibthrd.cxx 2009-03-18 06:43:30.000000000 +0300 |
26 |
--- src/ptlib/unix/tlibthrd.cxx.orig 2009-08-29 14:54:22.000000000 +0400 |
| 27 |
+++ src/ptlib/unix/tlibthrd.cxx 2009-04-25 22:03:45.000000000 +0400 |
27 |
+++ src/ptlib/unix/tlibthrd.cxx 2009-08-29 15:41:14.000000000 +0400 |
| 28 |
@@ -240,7 +240,7 @@ |
28 |
@@ -250,7 +250,7 @@ |
| 29 |
{ |
29 |
{ |
| 30 |
PWaitAndSignal m(activeThreadMutex); |
30 |
PWaitAndSignal m(activeThreadMutex); |
| 31 |
|
31 |
|
|
Lines 34-40
Link Here
|
| 34 |
return PFalse; |
34 |
return PFalse; |
| 35 |
|
35 |
|
| 36 |
return pthread_kill(id, sig) == 0; |
36 |
return pthread_kill(id, sig) == 0; |
| 37 |
@@ -249,8 +249,8 @@ |
37 |
@@ -259,8 +259,8 @@ |
| 38 |
void PProcess::PXSetThread(pthread_t id, PThread * thread) |
38 |
void PProcess::PXSetThread(pthread_t id, PThread * thread) |
| 39 |
{ |
39 |
{ |
| 40 |
activeThreadMutex.Wait(); |
40 |
activeThreadMutex.Wait(); |
|
Lines 45-76
Link Here
|
| 45 |
activeThreadMutex.Signal(); |
45 |
activeThreadMutex.Signal(); |
| 46 |
|
46 |
|
| 47 |
if (currentThread != NULL) |
47 |
if (currentThread != NULL) |
| 48 |
@@ -891,7 +891,7 @@ |
48 |
@@ -393,7 +393,7 @@ |
| 49 |
} |
49 |
if (id != 0) { |
| 50 |
|
50 |
process.activeThreadMutex.Wait(); |
| 51 |
// remove this thread from the active thread list |
51 |
pthread_detach(id); |
| 52 |
- process.activeThreads.SetAt((unsigned)id, NULL); |
52 |
- process.activeThreads.SetAt((unsigned)id, NULL); |
| 53 |
+ process.activeThreads.SetAt(_hptr(id), NULL); |
53 |
+ process.activeThreads.SetAt(_hptr(id), NULL); |
|
|
54 |
process.activeThreadMutex.Signal(); |
| 55 |
} |
| 56 |
|
| 57 |
--- src/ptlib/common/osutils.cxx.orig 2009-08-29 15:55:29.000000000 +0400 |
| 58 |
+++ src/ptlib/common/osutils.cxx 2009-08-29 15:55:32.000000000 +0400 |
| 59 |
@@ -2208,21 +2208,21 @@ |
| 60 |
PReadWriteMutex::Nest * PReadWriteMutex::GetNest() const |
| 61 |
{ |
| 62 |
PWaitAndSignal mutex(nestingMutex); |
| 63 |
- return nestedThreads.GetAt(POrdinalKey((INT)PThread::GetCurrentThreadId())); |
| 64 |
+ return nestedThreads.GetAt(POrdinalKey(_hptr(PThread::GetCurrentThreadId()))); |
| 65 |
} |
| 54 |
|
66 |
|
| 55 |
bool deleteThread = thread->autoDelete; // Get flag before releasing lock |
|
|
| 56 |
|
67 |
|
| 57 |
--- src/ptlib/common/osutils.cxx 2009-03-18 06:43:33.000000000 +0300 |
68 |
void PReadWriteMutex::EndNest() |
| 58 |
+++ src/ptlib/common/osutils.cxx 2009-04-25 22:03:35.000000000 +0400 |
|
|
| 59 |
@@ -1548,7 +1551,7 @@ |
| 60 |
, m_library(false) |
| 61 |
{ |
69 |
{ |
| 62 |
activeThreads.DisallowDeleteObjects(); |
70 |
nestingMutex.Wait(); |
| 63 |
- activeThreads.SetAt((PINDEX)GetCurrentThreadId(), this); |
71 |
- nestedThreads.RemoveAt(POrdinalKey((INT)PThread::GetCurrentThreadId())); |
| 64 |
+ activeThreads.SetAt(_hptr(GetCurrentThreadId()), this); |
72 |
+ nestedThreads.RemoveAt(POrdinalKey(_hptr(PThread::GetCurrentThreadId()))); |
|
|
73 |
nestingMutex.Signal(); |
| 74 |
} |
| 65 |
|
75 |
|
| 66 |
PProcessInstance = this; |
|
|
| 67 |
|
76 |
|
| 68 |
@@ -1912,7 +1915,7 @@ |
77 |
PReadWriteMutex::Nest & PReadWriteMutex::StartNest() |
| 69 |
PProcess & process = PProcess::Current(); |
78 |
{ |
|
|
79 |
- POrdinalKey threadId = (INT)PThread::GetCurrentThreadId(); |
| 80 |
+ POrdinalKey threadId = _hptr(PThread::GetCurrentThreadId()); |
| 70 |
|
81 |
|
| 71 |
process.activeThreadMutex.Wait(); |
82 |
nestingMutex.Wait(); |
| 72 |
- PThread * thread = process.activeThreads.GetAt((unsigned)GetCurrentThreadId()); |
|
|
| 73 |
+ PThread * thread = process.activeThreads.GetAt(_hptr(GetCurrentThreadId())); |
| 74 |
process.activeThreadMutex.Signal(); |
| 75 |
|
83 |
|
| 76 |
if (thread == NULL) |
|
|