Scroll to navigation

CURRENT_WORK(9) Driver Basics CURRENT_WORK(9)

NAME

current_work - retrieve current task's work struct

SYNOPSIS

struct work_struct * current_work(void);

ARGUMENTS

void

no arguments

DESCRIPTION

Determine if current task is a workqueue worker and what it's working on. Useful to find out the context that the current task is running in.

RETURN

work struct if current task is a workqueue worker, NULL otherwise.

COPYRIGHT

June 2024 Kernel Hackers Manual 3.10