On Sat, Jun 19, 2004 at 01:48:43PM +0300, Juhana Sadeharju wrote:
What it means practically? Any code? (Cannot check wikipedia now.)
Practically, there are memory barrier implied instructions. See the Linux
kernel for examples. I don't know how possible it is to bring all that to
user space, especially across platforms.
Quick question: disk thread may suspend if there are
no disk use.
How the disk thread is woken up to read the lock-free buffer?
Semaphore. Every time you put something into the buffer, up() the
semaphore (after). Every time you want to take something from the buffer,
down() the semaphore, first.