@@ -100,6 +100,7 @@ struct user_worker {
100100
101101static struct user_worker worker [CONFIG_CORE_COUNT ];
102102
103+ #if 0
103104static void sof_work_user_queue_init (struct k_work_user_q * work_q , k_thread_stack_t * stack ,
104105 size_t stack_size , int prio , const char * name )
105106{
@@ -118,6 +119,7 @@ static void sof_work_user_queue_init(struct k_work_user_q *work_q, k_thread_stac
118119
119120 ///k_thread_start(&work_q->thread);
120121}
122+ #endif // 0
121123
122124static int user_worker_get (int cpu )
123125{
@@ -134,19 +136,21 @@ static int user_worker_get(int cpu)
134136 }
135137
136138 k_event_init (& worker [cpu ].event );
137- sof_work_user_queue_init (& worker [cpu ].work_queue , worker [cpu ].stack_ptr ,
139+ k_work_user_queue_start (& worker [cpu ].work_queue , worker [cpu ].stack_ptr ,
138140 CONFIG_SOF_USERSPACE_PROXY_WORKER_STACK_SIZE , 0 , NULL );
139141
140142 worker [cpu ].thread_id = k_work_user_queue_thread_get (& worker [cpu ].work_queue );
141143
144+ k_thread_suspend (worker [cpu ].thread_id );
145+
142146 /* Pin worker thread to the same core as the module */
143147 k_thread_cpu_pin (worker [cpu ].thread_id , cpu );
144148
145149 k_thread_access_grant (worker [cpu ].thread_id , & worker [cpu ].event );
146150
147- worker [cpu ].reference_count ++ ;
151+ k_thread_resume ( worker [cpu ].thread_id ) ;
148152
149- k_thread_start ( & worker [cpu ].work_queue . thread ) ;
153+ worker [cpu ].reference_count ++ ;
150154
151155 return 0 ;
152156}
0 commit comments