Make halt and wait extern