[ECOS] TCP/IP preemption fix

Grant Edwards grante@visi.com
Thu Apr 13 12:40:00 GMT 2000

On Wed, Apr 12, 2000 at 06:13:04PM -0600, Gary Thomas wrote:

> Can you see if these patches fix [at least] the sockbuf
> corruption problem you were seeing?  

So far, it looks good.

> The basic idea I've incorporated is to use the eCos scheduler
> lock to emulate the user/kernel behaviour from the BSD world
> (i.e. kernel code cannot be preempted)

I'm still curious about DSRs causing problems by calling
cyg_drv_eth_recv (which calls ether_input).  They don't mess
with socket structures, but they do allocate and free mbufs.
That should be protected by the splimp/splx calls in the MBLOCK
macro, right?  

I can't see any other access to global data structures from
DSR-called routines that looks like it might be a problem.

Do splimp/splx really need to disable interrupts, or just lock
out DSRs?  For my driver I'm pretty sure locking out DSRs would
suffice, but that may not be true for other ethernet drivers.

Grant Edwards

More information about the Ecos-discuss mailing list