This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
possible fix for eth_drv_recv blocking DSR
- From: "Hook, James" <jhook at bloomberg dot com>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Fri, 24 Jun 2005 13:35:28 -0400
- Subject: [ECOS] possible fix for eth_drv_recv blocking DSR
I mask Ethernet driver interrupts at the top of spl_any(), and unmask
Ethernet driver interrupts at the bottom of cyg_splx(). This prevents a
DSR from executing while the splx_mutex is owned by another thread.
This solution assumes that the only time a DSR will be delayed by the
scheduler is if the thread that was interrupted had locked the scheduler
for some reason. The FreeBSD stack threads do not lock the scheduler so
the interrupt mask and mutex acquire operations in spl_any should be
atomic. Is this a correct assumption to make? I am worried that a
FreeBSD thread will mask the Ethernet driver interrupts while a DSR is
pending, and then the DSR will preempt the FreeBSD thread causing a race
condition. If the ECOS scheduler guarantees that a DSR will execute
immediately after its ISR, then this should not be a problem. Is this
the case?
Thanks,
James Hook
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss