| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | spinlock? |
Hi Janis! :-) [...] JK> If it fails to obtain the lock, it waits JK> (sleeps, spins it's wheels) until the thread which holds the lock JK> releases it. The difference is exactly in the "sleeps, spins it's wheels" part. A spinlock is a lock which you cannot sleep on, only busy-waiting in a tight loop is allowed. A lock you can sleep on is called a semaphore - at least those are the right terms when talking about the Linux kernel. Spinlocks are used to synchronize between different interrupt handlers or between interrupt handlers and normal kernel code - an interrupt handler *cannot* sleep, therefore a semaphore would not work. Ciao Pascal --- Msged/LNX 6.1.1* Origin: Flee at once, all is discovered. (1:153/401.2) SEEN-BY: 633/267 270 @PATH: 153/401 307 140/1 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.