kernel: thread: Add k_thread_foreach_filter_by_cpu() and unlocked version

Add functions k_thread_foreach_unlocked_filter_by_cpu() and
k_thread_foreach_filter_by_cpu() to loop through the threads on the
specified cpu only.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
2 files changed