guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some introductory docs about C level threading


From: Kevin Ryde
Subject: Re: Some introductory docs about C level threading
Date: Mon, 07 Feb 2005 11:48:04 +1100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

Ken Raeburn <address@hidden> writes:
>
> The problem is, if there are any case where it would be needed, then we 
> need to use it everywhere there could be a potential problem.  
> Depending on just how it works out, that could mean essentially 
> declaring some of the scheme object types (like cons cells) as 
> volatile, which would be poor for performance.

I'd think it shouldn't hurt too much.  A store written in the code
probably means a store should be done :-).  Optimizations for local
variables etc should be unchanged, just memory ops become exactly as
written.

> And volatile declarations may fix the possibility of storing incomplete 
> values, but I don't think it would deal with the cross-thread memory 
> access ordering issue.

I think we have to assume all threads see memory ops in the order
they're done (anything else is too crazy), and with that assumption
and some care libguile ought to be ok.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]