On Thu, Oct 9, 2014 at 1:29 PM, Andrew Fish <[email protected]> wrote:
>
> If you add volatile to Value then the loop
> will check the value on every iteration. If you just use the return value of
> the functions to return the value, you will always get the correct answer.

My question was really about the fact that when you add 'volatile' you
have to cast 'Value' when calling InterlockedIncrement() to avoid a
warning from gcc (and, I assume clang) that you're discarding the
'volatile' qualifier. Since InterlockedIncrement() straight away calls
into an internal function there won't be a correctness issue.

-- 
Bruce

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to