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:
parent
1601daa2c2
commit
fa401f1952
2 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue