IRC channel logs
2024-12-18.log
back to list of logs
<ZhaoM>It's so nice the channel log works again :) <azert>sneek: later tell ZhaoM that I don’t think you need atomic fetches if the variable that is fetched is volatile. There shouldn’t be any race if that’s the case <azert>Since an access to a volatile variable is considered a side effect, it is done for real and not optimized <azert>If I’m mistaken and the variable isn’t volatile, then you can cast it to volatile <youpi>that's however only when you are reading just one word. if you are reading several words they may be incoherent. <azert>youpi: in this case it would be a multi word number, right? Then you need to make sure you read the most significant words first and you are good <youpi>azert: even reading the most significant first will lead to incoherent data <youpi>if in-between you have a carry between the low-significant part and the high-significant part <youpi>e.g from 0,99 to 1,00, you might read 0,00 <azert>how come I didn’t think of that <azert>what is an efficient way of doing it correctly? <azert>overlapping words? error detection bits? <youpi>see check_seconds in struct mapped_time_value <sneek>ZhaoM, azert says: that I don’t think you need atomic fetches if the variable that is fetched is volatile. There shouldn’t be any race if that’s the case