Kthread worker is a single thread workqueue which can be used in cases
where specific kthread association is necessary, for example, when it
should have RT priority or be assigned to certain cgroup.
This change implements Linux v4.9 interface which mostly hides kthread
internals from users thus allowing to use ordinary taskqueue(9) KPI.
As kthread worker prohibits enqueueing of already pending or canceling
tasks some minimal changes to taskqueue(9) were done.
taskqueue_enqueue_flags() was added to taskqueue KPI which accepts extra
parameter called flags which supports following values:
TQFLG_FAILIF_CANCELING - taskqueue_enqueue_flags() fails if task is in
canceling state returning ECANCELED to caller.
TQFLG_FAILIF_PENDING - taskqueue_enqueue_flags() fails if task is already
scheduled to execution. EEXIST is returned to caller in that case and ta_pending counter value remains the same.
TBD: manpage update.
Required by: drm-kmod 5.10