News for hackers. Stuff that matters.
Re:How to trigger races reliably in the Linux kernel by gpderetta on Wednesday May 06, 2020 @06:41AM (#23089525)
Concurrent readers are supported, but not concurrent writers and readers. As Count is getting called outside of the critical section, the compiler can assume that there are no concurrent writers. Admittedly, the following critical section would make it hard for the compiler to actually apply any optimization in practice.

Count is implemented as a simple read currently, but that's not guaranteed to be the case in the future (that's the whole reason for having a property.

Fair enough about the rng, I'm not really a c# programmer, so I just assumed that dequeue would return a null on an empty queue.

I'm not an expert either, and certainly not a c# expert (although I kind of like the language, I haven't written a line in 7 years), so YMMV.

There are no comments on this comment yet.