workq test pattern failure, must the CONFIG_POLL be opened?


曹子龙
 

Hi all:

  i run the workqueue test case on test/kernel/workq dirctory,  but seems alwasy failure because of  "first_pending_thread" valid on below function , so the put workq operation return without success.  Did this mandatory ? must CONFIG_POLL  if wanna wrokq work? 

thanks for your support

void k_queue_insert(struct k_queue *queue, void *prev, void *data)
{
unsigned int key = irq_lock();
#if !defined(CONFIG_POLL)
struct k_thread *first_pending_thread;

first_pending_thread = _unpend_first_thread(&queue->wait_q);

if (first_pending_thread) {
prepare_thread_to_run(first_pending_thread, data);
if (!_is_in_isr() && _must_switch_threads()) {
(void)_Swap(key);
return;
}
irq_unlock(key);
return;
}
#endif /* !CONFIG_POLL */

sys_slist_insert(&queue->data_q, prev, data);

#if defined(CONFIG_POLL)
if (handle_poll_events(queue)) {
(void)_Swap(key);
return;
}
#endif /* CONFIG_POLL */

irq_unlock(key);
}



 

Join devel@lists.zephyrproject.org to automatically receive all group messages.