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:
parent
712ab9be40
commit
d15aa22b8e
@ -4448,7 +4448,7 @@ BTextView::CancelInputMethod()
|
||||
void
|
||||
BTextView::LockWidthBuffer()
|
||||
{
|
||||
if (atomic_add(&sWidthAtom, -1) <= 0) {
|
||||
if (atomic_add(&sWidthAtom, 1) > 0) {
|
||||
while (acquire_sem(sWidthSem) == B_INTERRUPTED)
|
||||
;
|
||||
}
|
||||
@ -4460,6 +4460,6 @@ BTextView::LockWidthBuffer()
|
||||
void
|
||||
BTextView::UnlockWidthBuffer()
|
||||
{
|
||||
if (atomic_add(&sWidthAtom, 1) < 0)
|
||||
if (atomic_add(&sWidthAtom, -1) > 1)
|
||||
release_sem(sWidthSem);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user