Alle 15:58, venerdì 5 agosto 2005, hai scritto: > On Fri, Aug 05, 2005 at 11:37:33 +0000, Vincenzo Mallozzi wrote: > > On Thu 5 Aug 2005, at 07:02, Jan Hudec wrote: > > > Perhaps your code is safe, but I would think you should have the list > > > modification itself (list_add_tail) protected by a spin_lock_irqsave. > > > That's the only way to exclude against interrupts (you can't lock > > > semaphores in interrupt context). > > > > > > > But I'm developing a project in a uniprocessor environment, so I think it's > > unnecessary to lock code with spinlock, or, better, it's redundant. > > That's not true since the preempt patch went in. Preempt is equivalent > to SMP. > First, I'm very grateful to you because I'm resolved my struct list_head problems and now I've really understood the use of these data structures. For the problem with Exception Handler and the spinlock, I'm trying to modify my code. But I've another question. Taking spinlock/spinlock_irq_save in an Exception Handler in order to scan two list that can be big, doesn't make problem with the mechanism of Interrupt Handling? In oder word, I've read in various Linux Kernel book (like Linux Kernel Programming, Linux Kernel Development, etc) that the use of spin lock in Interrupt Handler function must be very limited. Is it true? Thanks. Vincenzo Mallozzi. ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/