In quite some articles they suggest using the fistp instruction for converting float->integer in a fast way. This is dependent on the current rounding mode of the CPU, so you'll have to set it.
But can this rounding mode get changed during the runtime of the program by other programs? By the OS?
Even worse, is this a possible scenario (pseudocode)?
set_rounding_mode(ROUND_TRUNCATE);
/* process gets switched out and other process sets the rounding mode to round */
int x = round_with_fistp(0.6);
printf("%d\n", x); // prints 1