[PATCH 6/7] pid: mark struct task const in helper functions