[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What are the arguments in favor of delay/force in eval.c?
From: |
Rob Browning |
Subject: |
Re: What are the arguments in favor of delay/force in eval.c? |
Date: |
Wed, 07 Dec 2005 17:28:10 -0800 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
Ken Raeburn <address@hidden> writes:
> Of course, the compiler might reorder these accesses, unless you
> make everything volatile. Even then, the CPU still might reorder
> them so another compiler might see something different. I'd be
> worried about the reordering or caching in another processor if the
> code decides it can bypass all the mutex stuff, too.
>
> Once every thread agrees on the new data value and no mutex needed,
> everything should be fine, but managing the transition to that state
> (without adding *another* mutex) is very tricky.
Yeah. I definitely wondered if there was a way to do it completely
safely without full protection. I'm always hesitant about code that
relies on so many assumptions, though I (obviously) wasn't thinking
about the reordering issues. (Of course, I pretty much always fully
protect things in real code, so it's not an issue...)
> Actually, I think some memory models will allow some accesses to be
> moved into the region where the lock is held from outside it.
Interesting.
Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
- What are the arguments in favor of delay/force in eval.c?, Rob Browning, 2005/12/06
- Re: What are the arguments in favor of delay/force in eval.c?, Kevin Ryde, 2005/12/07
- Re: What are the arguments in favor of delay/force in eval.c?, Rob Browning, 2005/12/07
- Re: What are the arguments in favor of delay/force in eval.c?, Kevin Ryde, 2005/12/07
- Re: What are the arguments in favor of delay/force in eval.c?, Rob Browning, 2005/12/07
- Re: What are the arguments in favor of delay/force in eval.c?, Kevin Ryde, 2005/12/09
- Re: What are the arguments in favor of delay/force in eval.c?, Rob Browning, 2005/12/09
- Re: What are the arguments in favor of delay/force in eval.c?, Kevin Ryde, 2005/12/14
- Re: What are the arguments in favor of delay/force in eval.c?, Ken Raeburn, 2005/12/07
- Re: What are the arguments in favor of delay/force in eval.c?,
Rob Browning <=