Kernel utility functions
Prev
Chapter 1. Driver Basics
Next
Kernel utility functions
upper_32_bits
— return bits 32-63 of a number
lower_32_bits
— return bits 0-31 of a number
might_sleep
— annotation for functions that can sleep
trace_printk
— printf formatting in the ftrace buffer
clamp
— return a value clamped to a given range with strict typechecking
clamp_t
— return a value clamped to a given range using a given type
clamp_val
— return a value clamped to a given range using val's type
container_of
— cast a member of a structure out to the containing structure
printk
— print a kernel message
acquire_console_sem
— lock the console system for exclusive use.
release_console_sem
— unlock the console system
console_conditional_schedule
— yield the CPU if required
printk_timed_ratelimit
— caller-controlled printk ratelimiting
kmsg_dump_register
— register a kernel log dumper.
kmsg_dump_unregister
— unregister a kmsg dumper.
panic
— halt the system
emergency_restart
— reboot the system
kernel_restart
— reboot the system
kernel_halt
— halt the system
kernel_power_off
— power_off the system
orderly_poweroff
— Trigger an orderly system poweroff
rcu_read_lock_bh_held
— might we be in RCU-bh read-side critical section?