[ros-dev] [ros-diffs] [pschweitzer] 52065: [NTOSKRNL] - renamed Io volumes g

Alex Ionescu ionucu at videotron.ca
Fri Jun 3 15:55:01 UTC 2011


While the paper on Linux's spinlock semantics was very interesting, it remains the fact that this is not the case in Windows in this particular instance.

A lot of ReactOS code *is* missing calls such as KeMemoryBarrier() and (volatile), and only works by chance, so the argument that "otherwise our code wouldn't work" is a bit of a fallacy.

You also need to think outside the strict-ordering x86 box. Most of ReactOS' code is totally borked on IA64, PPC or ARM (and semi-broken on x64 too, which has looser ordering).

Of course, feel free to ignore the suggestion.

--
Best regards,
Alex Ionescu

On 2011-06-03, at 8:08 AM, Timo Kreuzer wrote:

> Am 03.06.2011 13:24, schrieb Alex Ionescu:
>> Ah, I didn't see the caller.
>> 
>> There's still the issue of the missing volatile. It's required to make sure there is strict ordering between the spinlock acquisition and the increment/decrement.
>> 
> Ordering is guaranteed, since the spinlock functions act as memory barriers, otherwise a lot of our code wouldn't work.
> Suggested reading: http://kernel.org/doc/Documentation/volatile-considered-harmful.txt
> 
> Regards,
> Timo
> 
> 
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev




More information about the Ros-dev mailing list