Put posix semantic calculation in the same place in both routines