1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-07 04:10:08 +00:00

corrected a 64-bit issue in ReadWriteLock

This commit is contained in:
jules 2008-12-10 10:40:34 +00:00
parent 1601daa2c2
commit fa401f1952
2 changed files with 4 additions and 4 deletions

View file

@ -14325,7 +14325,7 @@ void ReadWriteLock::exitRead() const throw()
{
if (readerThreads.getUnchecked(i) == threadId)
{
const int newCount = ((int) (Thread::ThreadID) readerThreads.getUnchecked (i + 1)) - 1;
const pointer_sized_int newCount = ((pointer_sized_int) readerThreads.getUnchecked (i + 1)) - 1;
if (newCount == 0)
{
@ -14334,7 +14334,7 @@ void ReadWriteLock::exitRead() const throw()
}
else
{
readerThreads.set (i + 1, (Thread::ThreadID) (pointer_sized_int) newCount);
readerThreads.set (i + 1, (Thread::ThreadID) newCount);
}
return;

View file

@ -99,7 +99,7 @@ void ReadWriteLock::exitRead() const throw()
{
if (readerThreads.getUnchecked(i) == threadId)
{
const int newCount = ((int) (Thread::ThreadID) readerThreads.getUnchecked (i + 1)) - 1;
const pointer_sized_int newCount = ((pointer_sized_int) readerThreads.getUnchecked (i + 1)) - 1;
if (newCount == 0)
{
@ -108,7 +108,7 @@ void ReadWriteLock::exitRead() const throw()
}
else
{
readerThreads.set (i + 1, (Thread::ThreadID) (pointer_sized_int) newCount);
readerThreads.set (i + 1, (Thread::ThreadID) newCount);
}
return;