lkml.org 
[lkml]   [1999]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Of locks, spinlocks and printks in schedule()
On Tue, Jul 27, 1999 at 12:31:01PM -0400, Hugo Varotto wrote:

> Now, I don't know why, but it seems that if I putt a
> printk in the schedule() routine, between the pair of
>
> spin_lock_irq(&runqueue_lock);
> ...
> spin_unlock_irq(&runqueue_lock);
>
> commands, the kernel crashes ( or actually, to be more precise, it
> freezes ).

Err, printk() does a

wake_up_interruptible(&log_wait);

__wake_up() calls wake_up_process() for each process on the wait queue, and
this gets the runqueue_lock again.

--
We are Linux. Resistance is an indication that you missed the point.

-
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:53    [W:0.084 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site