[ECOS] Lock in Cyg_Interrupt::call_pending_DSRs_inner

David Hsu davidhsu@realtek.com.tw
Wed Jan 30 18:30:00 GMT 2002


Hi Jonathan,

Thanks your reply, but it seemed not much helps in my case. When I used diag_printf() to print out some debug message continuously (either in DSR or in a idle thread), the pending scenario will not happen. Following is the synchronization mechanism between my ISR, DSR, and thread, please look it and see any place might cause the problem.

ISR()
{
  mask NIC interrupt.
  cyg_interrupt_acknowledge( vector );
  return(CYG_ISR_HANDLED|CYG_ISR_CALL_DSR);
}

DSR()
{
  process the interrupt event
  call cyg_drv_cond_signal() to signal thread
  unmask NIC interrupt
}

Thread()
{
  cyg_drv_mutex_lock()
  while(1) {
	cyg_drv_cond_wait()
	process the data
  } 
  cyg_drv_mutex_lock()
}

Actually, besides condition variable, I have tried to use the "flag" for synchronization, but the result is the same.


-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Jonathan Larmour
Sent: Saturday, January 26, 2002 3:41 AM
To: David Hsu
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] RE: Lock in Cyg_Interrupt::call_pending_DSRs_inner


David Hsu wrote:
> 
> I am still fighting this problem. Could somebody give me some hints?

Maybe the processor has got wedged somehow when processing an interrupt,
and the fact you took an exception unwedges it.

I suggest using the old faithful technique of
 diag_printf("got here #1\n"); 

etc. to find out where it reaches! You could also consider using the kernel
instrumentation.

Jifl

> -----Original Message-----
> From: David Hsu [mailto:davidhsu@realtek.com.tw]
> Sent: Friday, January 18, 2002 3:24 PM
> To: ecos-discuss@sources.redhat.com
> Subject: Lock in Cyg_Interrupt::call_pending_DSRs_inner
> 
> Dear all,
> 
> I implemented my own Ethernet driver and which will bridge the LAN traffics between two Ethernet adapters under PC environment. After running the bridge driver for a while (a couple of hours), the program seemed pending.
> 
> The interesting thing was when I stop the GDB debugger, it will always stay at the line Cyg_Interrupt::call_pending_DSRs_inner(), and the traffics birding could be operated again after GDB is free run.
> 
> It seemed the problem is locked in INTR module, and it will be resolved automatically after GDB invoked.
> 
> Any idea is appreciated.
> 
> Thanks.
> 
> /David

-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


More information about the Ecos-discuss mailing list