mod: split poll_* function for platform code