I used gdb print out backstack, the latest function was
fusion_skirmish_prevail() - I am in disas mode and see executing loop before
the first RET instruction, compare with source code, it should be in first
lock:
ret = fusion_skirmish_lock( &dev->skirmish, id, true, &skirmish );
seems it is waiting for get lock.
You say "code looks fine", means I don't have to add the line below?
> >> fusion_skirmish_unlock( skirmish ); // original code does not have this
> >> line
Victor> Date: Thu, 6 Dec 2007 11:48:50 +0100> From: [EMAIL PROTECTED]> To:
[EMAIL PROTECTED]> CC: directfb-dev@directfb.org> Subject: Re: [directfb-dev]
linux-fusion lock problem> > Denis Oliver Kropp wrote:> > Victor Liu wrote:> >>
Hi,> >> > >> while I am using DirectFB with fusion, some time the application
was locked. we debugged into, find lock is in fusion. I looked the code, found
a place seems missed unlock (see red line or comment). if any one knows
linux-fusion, please make sure. both 3.x or 7.x have same code.> >> > >>
Thanks,> >> Victor Liu> >> > >> int> >> fusion_skirmish_prevail (FusionDev
*dev, int id, int fusion_id)> >> {> >> int ret;> >> FusionSkirmish *skirmish;>
>> #ifdef FUSION_DEBUG_SKIRMISH_DEADLOCK> >> FusionSkirmish *s;> >> int i;> >>
bool outer = true;> >> #endif> >> dev->stat.skirmish_prevail_swoop++;> >> ret =
fusion_skirmish_lock( &dev->skirmish, id, true, &skirmish );> >> if (ret)> >>
return ret;> >> > >> ......> >> > >> up( &dev->skirmish.lock );> >> while
(skirmish->lock_pid) {> >> ret = fusion_skirmish_wait( skirmish, NULL );> >> if
(ret)> >> {> >> fusion_skirmish_unlock( skirmish ); // original code does not
have this line> > > > IIRC, a non-zero return value (error) means the lock is
not reacquired.> > Only if the call was successful, the code needs to unlock
it.> > > > But I'm checking the code now (fusion_entry_wait).> > The code looks
fine. Where exactly is it blocking in your case?> > -- > Best regards,> Denis
Oliver Kropp> > .------------------------------------------.> | DirectFB -
Hardware accelerated graphics |> | http://www.directfb.org/ |>
"------------------------------------------"
_________________________________________________________________
Your smile counts. The more smiles you share, the more we donate. Join in.
www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev