use new platform macros to access scheduling/per-cpu flags. fix execsmp wait()