Re: [linux-audio-dev] Re: mutex madness

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Re: mutex madness
From: Eli Brandt (eli_AT_v.gp.cs.cmu.edu)
Date: pe loka   01 1999 - 21:49:35 EDT


Paul Barton-Davis wrote:
> is this related to herlihy's wait free synchronization, or something
> else ?

Dunno. The logic here is
single writer:
        check head beyond tail
        write through tail pointer
        advance tail
single reader:
        check tail beyond head
        read through head pointer
        advance head
where "beyond" and "advance" are circular.
(Disclaimer: I got this from the comments, not the code.)

I think the requirements for this to be safe are
1) pointers are written atomically.
2) writes don't get reordered.

As David Olofson mentioned, RTLinux uses these. They're handy when
you can't deal with priority inversion -- when priority inheritance
makes no sense, as in RTLinux, or when it doesn't fix the problem, as
in many hard RT systems.

-- 
     Eli Brandt  |  eli+@cs.cmu.edu  |  http://www.cs.cmu.edu/~eli/


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:27:12 EST