--- Halil Demirezen <demirh@bilmuh.ege.edu.tr> wrote: > > in linux/spinlock.h the spinlocks are defined > and i want to know what kind of a reasonability does it have to > define > spin_lock and spin_unlock in the following way. > > > #define spin_lock(lock) do {} while(0) > #define spin_unlock(lock) (void)... > The do{}while(0) is explained in the FAQ. You'll find a link to the FAQ at the bottom of this message. > > to be shorty, what is the actual aim of spin_lock and spin_unlock , > spin_lock_irq spin_unlock_irq.....etc > > and what is the aim of semaphores. > A discussion of spinlocks can be found at http://www.xml.com/ldd/chapter/book/ch09.html#t8. Scoll down to "Using Spinlocks". <snip> Harmony, --Christine __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/