lkml.org 
[lkml]   [1999]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: interrupts and synchronization
Date
> for a network device driver I have to check a condition variable.
> If this is not set properly, I have to wait until it changes
> before I proceed with the processing of the package.

You can't do it that way

> Is there any easy solution to my problem, or is it impossible to
> do this way?

It is impossible to do that way. If you need to protect your condition
variable you probably actually want to disable interrupts while the
driver is unsafe to receive. If the driver is slow you should make the
irq routine atomically test a bit flag and queue the packet to a seperate
sk_buff queue for delayed processing. When you sort the condition out, clear
the bit flag and empty the delayed queue


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