flush_workqueue

Name

flush_workqueue — ensure that any scheduled work has run to completion.

Synopsis

void fastcallflush_workqueue( struct workqueue_struct * wq);

Arguments

wq

workqueue to flush

Description

Forces execution of the workqueue and blocks until its completion. This is typically used in driver shutdown handlers.

This function will sample each workqueue's current insert_sequence number and will sleep until the head sequence is greater than or equal to that. This means that we sleep until all works which were queued on entry have been handled, but we are not livelocked by new incoming ones.

This function used to run the workqueues itself. Now we just wait for the helper threads to do it.

你可能感兴趣的:(Queue)