Email List: Xaustin-group-lX
[All Lists]

Re: Defect in XBD 4.10 Memory Synchronization [sem_getvalue]

To: Dave Butenhof <yyyyyyyyyyyyyy@xxxxxx>
Subject: Re: Defect in XBD 4.10 Memory Synchronization [sem_getvalue]
From: Alexander Terekhov <yyyyyyyy@xxxxxxxxxx>
Date: Fri, 5 Nov 2004 15:16:25 +0100
Cc: yyyyyyyyyyyyyy@xxxxxxxxxxxxx
Dave Butenhof <yyyyyyyyyyyyyy@xxxxxx> wrote:
[...]
> Furthermore, it's unlikely that most implementations of sem_getvalue() 
> would be able to avoid general memory synchronization in any case; 

Consider

http://groups.google.com/groups?threadm=418AA828.6CD4E023%40web.de
(Subject: Re: fundamental semaphore question)

Naive approach is nothing but "atomic_load(&lock) & 0x7FFFFFFF" 
(without acquire). But it isn't correct because it could break 
(due to value prediction and things like that) totally conforming 
DCSI-SEMAS like code.

regards,
alexander.

<Prev in Thread] Current Thread [Next in Thread>