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
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
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
set_groups
— Change a group subscription in a set of credentials
set_current_groups
— Change current's group subscription
orderly_poweroff
— Trigger an orderly system poweroff
synchronize_rcu
— wait until a grace period has elapsed.
rcu_barrier
— Wait until all in-flight
call_rcu
callbacks complete.
rcu_barrier_bh
— Wait until all in-flight
call_rcu_bh
callbacks complete.
rcu_barrier_sched
— Wait for in-flight
call_rcu_sched
callbacks.