Subject: Re: [linux-audio-dev] Re: lock-free data structures
From: Tim Hockin (thockin_AT_hockin.org)
Date: Sun Jun 20 2004 - 02:58:15 EEST
On Sat, Jun 19, 2004 at 01:48:43PM +0300, Juhana Sadeharju wrote:
> >http://en.wikipedia.org/wiki/Memory_barrier
>
> 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.
This archive was generated by hypermail 2b28 : Sun Jun 20 2004 - 02:54:11 EEST