lkml.org 
[lkml]   [1999]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Why isn't this a bug in run_bottom_halves() (2.2.5)?
On Sun, 6 Jun 1999, Scott Maxwell wrote:

>static inline void run_bottom_halves(void)
>{
> unsigned long active;
> void (**bh)(void);
>
> active = get_active_bhs();
>/*
> * Interrupts are enabled here. So suppose an interrupt occurs when
> * we're right here and its top half marks a previously unmarked
> * bottom half. do_IRQ() won't execute run_bottom_halves() after
> * servicing the new interrupt's top half because we already have the
> * lock for run_bottom_halves(), but when we return to this point, we
> * zero bh_active in the next line, so the newly marked BH never gets

We don't zero bh_active, we only zero the bits that we are going to serve.
And we clear them with an andl with the lock on the bus so we can't SMP
race.

Andrea Arcangeli


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.046 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site