1SYSFS_SCHEDULE_CALLB(9) The Filesystem for Exporting K SYSFS_SCHEDULE_CALLB(9)
2
3
4

NAME

6       sysfs_schedule_callback - helper to schedule a callback for a kobject
7

SYNOPSIS

9       int sysfs_schedule_callback(struct kobject * kobj,
10                                   void (*func) (void *), void * data,
11                                   struct module * owner);
12

ARGUMENTS

14       kobj
15           object we're acting for.
16
17       func
18           callback function to invoke later.
19
20       data
21           argument to pass to func.
22
23       owner
24           module owning the callback code
25

DESCRIPTION

27       sysfs attribute methods must not unregister themselves or their parent
28       kobject (which would amount to the same thing). Attempts to do so will
29       deadlock, since unregistration is mutually exclusive with driver
30       callbacks.
31
32       Instead methods can call this routine, which will attempt to allocate
33       and schedule a workqueue request to call back func with data as its
34       argument in the workqueue's process context.  kobj will be pinned until
35       func returns.
36
37       Returns 0 if the request was submitted, -ENOMEM if storage could not be
38       allocated, -ENODEV if a reference to owner isn't available, -EAGAIN if
39       a callback has already been scheduled for kobj.
40
42Kernel Hackers Manual 3.10         June 2019           SYSFS_SCHEDULE_CALLB(9)
Impressum