---
name: "kthread_worker_fn"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/kthread_worker_fn"
---

# kthread\_worker\_fn(9)

kthread function to process kthread\_worker

## NAME

kthread\_worker\_fn - kthread function to process kthread\_worker

## SYNOPSIS

**int kthread\_worker\_fn(void \*** *worker\_ptr***);**

## ARGUMENTS

*worker\_ptr*

pointer to initialized kthread\_worker

## DESCRIPTION

This function can be used as *threadfn* to **kthread\_create** or **kthread\_run** with *worker\_ptr* argument pointing to an initialized kthread\_worker. The started kthread will process work\_list until the it is stopped with **kthread\_stop**. A kthread can also call this function directly after extra initialization.

Different kthreads can be used for the same kthread\_worker as long as there's only one kthread attached to it at any given time. A kthread\_worker without an attached kthread simply collects queued kthread\_works.

## COPYRIGHT
