Re-fixed widthbuffer locking. I obviously broke this when I made that change in InterfaceDefs.cpp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12526 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4448,7 +4448,7 @@ BTextView::CancelInputMethod()
|
|||||||
void
|
void
|
||||||
BTextView::LockWidthBuffer()
|
BTextView::LockWidthBuffer()
|
||||||
{
|
{
|
||||||
if (atomic_add(&sWidthAtom, -1) <= 0) {
|
if (atomic_add(&sWidthAtom, 1) > 0) {
|
||||||
while (acquire_sem(sWidthSem) == B_INTERRUPTED)
|
while (acquire_sem(sWidthSem) == B_INTERRUPTED)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@@ -4460,6 +4460,6 @@ BTextView::LockWidthBuffer()
|
|||||||
void
|
void
|
||||||
BTextView::UnlockWidthBuffer()
|
BTextView::UnlockWidthBuffer()
|
||||||
{
|
{
|
||||||
if (atomic_add(&sWidthAtom, 1) < 0)
|
if (atomic_add(&sWidthAtom, -1) > 1)
|
||||||
release_sem(sWidthSem);
|
release_sem(sWidthSem);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user