Skip to content

Commit ef5ad64

Browse files
committed
dp thread fix
1 parent ed80971 commit ef5ad64

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

src/schedule/zephyr_dp_schedule_thread.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,18 +131,17 @@ void dp_thread_fn(void *p1, void *p2, void *p3)
131131
DP_TASK_EVENT_CANCEL | DP_TASK_EVENT_IPC, false,
132132
K_FOREVER);
133133

134-
state = task->state; /* to avoid undefined variable warning */
135-
if (task->state == SOF_TASK_STATE_RUNNING) {
136-
switch (event) {
137-
case DP_TASK_EVENT_PROCESS:
138-
state = task_run(task);
139-
break;
140-
case DP_TASK_EVENT_IPC:
141-
assert(task_pdata->ipc_work_item);
142-
userspace_proxy_worker_handler(task_pdata->ipc_work_item);
134+
#if IS_ENABLED(CONFIG_SOF_USERSPACE_MOD_IPC_BY_DP_THREAD)
135+
if (event & DP_TASK_EVENT_IPC) {
136+
assert(task_pdata->ipc_work_item);
137+
userspace_proxy_worker_handler(task_pdata->ipc_work_item);
138+
if (!(event ^ DP_TASK_EVENT_IPC))
143139
continue;
144-
}
145140
}
141+
#endif
142+
state = task->state; /* to avoid undefined variable warning */
143+
if (task->state == SOF_TASK_STATE_RUNNING && event & DP_TASK_EVENT_PROCESS)
144+
state = task_run(task);
146145

147146
lock_key = scheduler_dp_lock(task->core);
148147
/*

0 commit comments

Comments
 (0)