Skip to content

Commit d7b3131

Browse files
Jyri Sarhalgirdwood
authored andcommitted
zephyr: idc: Name IDC p4wq threads
Name IDC p4wq threads. Unfortunately the idc threads only get their names after they are needed for the first time. Until that time they appear as unnamed (a hex number) threads on core 0. There is also one funny thing. There is static thread reserved for core 0, but that is never activated, and it remains there as a hex number forever. However, in this simple and risk free convenience fix, I do not dare to touch that. Maybe later. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 400d553 commit d7b3131

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/idc/zephyr_idc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,14 @@ int idc_send_msg(struct idc_msg *msg, uint32_t mode)
198198

199199
void idc_init_thread(void)
200200
{
201+
char thread_name[] = "idc_p4wq0";
201202
int cpu = cpu_get_id();
202203

203204
k_p4wq_enable_static_thread(q_zephyr_idc + cpu,
204205
_p4threads_q_zephyr_idc + cpu, BIT(cpu));
206+
207+
thread_name[sizeof(thread_name) - 2] = '0' + cpu;
208+
k_thread_name_set(_p4threads_q_zephyr_idc + cpu, thread_name);
205209
/*
206210
* Assign SOF system heap to the IDC thread. Otherwise by default it
207211
* uses the Zephyr heap for DP stack allocation

0 commit comments

Comments
 (0)