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:
@@ -4468,7 +4468,7 @@ void
|
|||||||
BTextView::LockWidthBuffer()
|
BTextView::LockWidthBuffer()
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
if (atomic_add(&sWidthAtom, 1) > 0) {
|
if (atomic_add(&sWidthAtom, -1) <= 0) {
|
||||||
while (acquire_sem(sWidthSem) == B_INTERRUPTED)
|
while (acquire_sem(sWidthSem) == B_INTERRUPTED)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@@ -4481,6 +4481,6 @@ void
|
|||||||
BTextView::UnlockWidthBuffer()
|
BTextView::UnlockWidthBuffer()
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
if (atomic_add(&sWidthAtom, -1) > 1)
|
if (atomic_add(&sWidthAtom, 1) < 0)
|
||||||
release_sem(sWidthSem);
|
release_sem(sWidthSem);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user