Commit Graph
2 Commits
Author SHA1 Message Date
Andrew Cooper 7915fc1587 minios: fix incorrect {, un}likely() definitions
As identified in e5545fb6, likely() and unlikely() must convert their
expressions to booleans before comparing to 1 or 0, to avoid truncation
issues.

While editing this file, add inclusion guards.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2014-07-02 14:46:42 +02:00
Thomas Leonard 3973f7f331 mini-os: moved unlikely/likely macros to new compiler.h
Requested by Julien Grall.

Signed-off-by: Thomas Leonard <talex5@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2014-06-27 14:13:20 +01:00