Definition of spin_lock(lock) and spin_unlock(lock)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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)...


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.

i have read a documentation that basically describes them but not in more
detail so that i counld not get it well enough.

sincerely.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux