| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | spinlock? |
Hi Pascal, > [...] >> If it fails to obtain the lock, it waits >> (sleeps, spins it's wheels) until the thread which holds the lock >> 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 th > right terms when talking about the Linux kernel. Ah.. > 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. Ok, makes sense. Take care, Janis --- BBBS/LiI v4.01 Flag-5* Origin: Prism bbs (1:261/38) SEEN-BY: 633/267 270 @PATH: 261/38 123/500 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™.