On 26-Jun-99 Jesus Monroy wrote:
> > An approach like that can't possibly be sufficient if code has been
> > written with the assumption that only interrupt-like events or
> > blocking calls can change things from under it.  There is quite a bit
> > of code in FreeBSD that relies on this.
>     Can you elaborate on this a bit more? I think I missing
>     some of the finer points on what you are saying.
>  
>     I work on interrupt driven device drivers and I'm trying
>     to see how this ties in.


The reason is that if kernel code is written to not protect against reentrancy
then it will have race conditions in SMP.

The splXXX() macros are used in drivers to protect against code reentrancy when
an interrupt occurs. Usually they are around routines which modify a data
structure which can also be modified by the drivers interrupt handler.

---
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum


PGP signature

Reply via email to