kernel: Fix kernel build when _KPOSIX_PRIORITY_SCHEDULING is not set.

Define p31b_proc() and p31b_proc_done() only when it is set.