James Hawkins wrote:
Changelog
- Use InterlockedDecrement and InterlockedIncrement instead of ++/--.
Again, all of these patches do not fix the whole point about using the Interlocked* functions, which is that the variable must always be used *atomically*. That means if you grep the file for uses of "This->ref" (or the equivalent) then they should all only be as parameters to Interlocked* functions.
Rob
(or the equivalent) then they should all only be as parameters to Interlocked* functions
Does that apply to the TRACE's as well?
On Fri, 17 Sep 2004 21:22:22 +0100, Robert Shearman rob@codeweavers.com wrote:
James Hawkins wrote:
Changelog
- Use InterlockedDecrement and InterlockedIncrement instead of ++/--.
Again, all of these patches do not fix the whole point about using the Interlocked* functions, which is that the variable must always be used *atomically*. That means if you grep the file for uses of "This->ref" (or the equivalent) then they should all only be as parameters to Interlocked* functions.
Rob
James Hawkins wrote:
(or the equivalent) then they should all only be as parameters to Interlocked* functions
Does that apply to the TRACE's as well?
No. If you can easily change TRACE's to use the return value from an Interlocked* function then that may be preferable, but it won't change how the program functions so it is fine if you don't.
Rob