summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2012-07-23 16:03:51 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-09-23 07:41:56 -0700
commitbcfa57ce10d3d53d37a6e324f3010b1ce6a2784a (patch)
tree1d365a7a64e3ea1d1dc743afcc1de4b6935caa57 /samples
parent25d30cf4250f74e5ceb35f8f39739782408db633 (diff)
downloadlinux-bcfa57ce10d3d53d37a6e324f3010b1ce6a2784a.tar.bz2
rcu: Eliminate signed overflow in synchronize_rcu_expedited()
In the C language, signed overflow is undefined. It is true that twos-complement arithmetic normally comes to the rescue, but if the compiler can subvert this any time it has any information about the values being compared. For example, given "if (a - b > 0)", if the compiler has enough information to realize that (for example) the value of "a" is positive and that of "b" is negative, the compiler is within its rights to optimize to a simple "if (1)", which might not be what you want. This commit therefore converts synchronize_rcu_expedited()'s work-done detection counter from signed to unsigned. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions