By: Konrad Schwarz (konrad.schwarz.delete@this.siemens.com), July 21, 2015 7:15 am
Room: Moderated Discussions
Maynard Handley (name99.delete@this.name99.org) on July 12, 2015 12:32 pm wrote:
> I can offer one possible example. You leave the compiler out your discussion, but it is often the case that
> you have to indicate to the compiler (not just the HW) about memory re-ordering. So it's reasonable at that
> point to say "since this information has to be in the program, anyway, if you want correctness in the face of
> modern compilers, so why not propagate it down to the hardware, and we can perhaps usefully use it there?"
To rehash a point made above, the indication you need to give the compiler are
pthread_mutex_lock(), pthread_mutex_unlock() etc.
Luckily, these are the same indications you need to give to make the hardware work correctly.
"Two birds with one stone", so to speak.
> I can offer one possible example. You leave the compiler out your discussion, but it is often the case that
> you have to indicate to the compiler (not just the HW) about memory re-ordering. So it's reasonable at that
> point to say "since this information has to be in the program, anyway, if you want correctness in the face of
> modern compilers, so why not propagate it down to the hardware, and we can perhaps usefully use it there?"
To rehash a point made above, the indication you need to give the compiler are
pthread_mutex_lock(), pthread_mutex_unlock() etc.
Luckily, these are the same indications you need to give to make the hardware work correctly.
"Two birds with one stone", so to speak.