[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-devel] RFC: SYS_ARCH_DECL_PROTECT makes no sense, remov e it

From: Pettinato, Jim
Subject: RE: [lwip-devel] RFC: SYS_ARCH_DECL_PROTECT makes no sense, remov e it
Date: Wed, 5 May 2004 17:15:50 -0400

>BTW, how do you handle the case where a task holds the lock and then the
network driver interrupt 
>fires with a packet received? The interrupt cannot obtain the lock.

Actually, the protection mechanism we've been discussing prevents that. Ints
are disabled while the lightweight protection scheme is in a critical
section (between SYS_ARCH_PROTECT() and SYS_ARCH_UNPROTECT()). I think this
is how Adam intended they be used.

Without a preemptive kernel, I could not wait around for the task-level
driver to read the ethernet device, the SMSC chip only has a 4-deep hardware
fifo. Hence the bad habit. :) I'm considering ways of breaking that bad
habit; I'm not thrilled with the idea of calling allocation routines from an
ISR myself.

Thanks for your input - how do you keep up with incoming packets at the task
level if you've no preemptive scheduler?

James M. Pettinato, Jr.
Software Engineer
FMC Measurement Solutions/Smith Meter, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]