Re: spinlock

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

 



Hello!

Dne četrtek 27. februar 2003 20:47 je Frank A. Uepping napisal(a):

> Is that true that a spinlock gets undefined when compiled
> on a uniprocessor system?

No.

> Thus spinlocks can't be used to provide mutual exclusion between
> concurrently executing processes on a uniprocessor system, isn't is?

No.

I use them on UP as mutexes.. heavily. You use spinlock if structures you are 
protecting are being accessed from interrupt/timer/softirq context.

Mutexes are to be used when structures are accessed *only* from process 
context.

-- 
best regards,
Rok Papež.

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