Skip to Content
Linux Device Drivers Development
book

Linux Device Drivers Development

by John Madieu
October 2017
Intermediate to advanced
586 pages
14h 8m
English
Packt Publishing
Content preview from Linux Device Drivers Development

Tasklets

Tasklets are a bottom-half (we will see what this means later) mechanism built on top of softirqs. They are represented in the kernel as instances of the struct tasklet_struct:

struct tasklet_struct 
{ 
    struct tasklet_struct *next; 
    unsigned long state; 
    atomic_t count; 
    void (*func)(unsigned long); 
    unsigned long data; 
}; 

Tasklets are not re-entrant by nature. Code is called reentrant if it can be interrupted anywhere in the middle of its execution, and then be safely called again. Tasklets are designed such that a tasklet can run on one and only one CPU simultaneously (even on an SMP system), which is the CPU it was scheduled on, but different tasklets may be run simultaneously on different CPUs. The tasklet API is quite basic and intuitive. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Device Drivers, Second Edition

Linux Device Drivers, Second Edition

Jonathan Corbet, Alessandro Rubini
Linux Device Drivers, 3rd Edition

Linux Device Drivers, 3rd Edition

Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman

Publisher Resources

ISBN: 9781785280009Supplemental Content