Fixed issue with Lock/UnlockStaticBuffer() on R5
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9286 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9edda3ec6d
commit
cbc9d62f52
@ -4468,7 +4468,7 @@ void
|
||||
BTextView::LockWidthBuffer()
|
||||
{
|
||||
CALLED();
|
||||
if (atomic_add(&sWidthAtom, 1) > 0) {
|
||||
if (atomic_add(&sWidthAtom, -1) <= 0) {
|
||||
while (acquire_sem(sWidthSem) == B_INTERRUPTED)
|
||||
;
|
||||
}
|
||||
@ -4481,6 +4481,6 @@ void
|
||||
BTextView::UnlockWidthBuffer()
|
||||
{
|
||||
CALLED();
|
||||
if (atomic_add(&sWidthAtom, -1) > 1)
|
||||
if (atomic_add(&sWidthAtom, 1) < 0)
|
||||
release_sem(sWidthSem);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user