Locking while executing bottom-halves and process context code
Pratyush Patel
pratyushpatel.1995 at gmail.com
Sun Feb 14 00:30:40 EST 2016
Hello,
While reading a section in Linux Kernel Development, I came across the
following:
"If process context code and a bottom half share data, you need to
disable bottom-half processing and obtain a lock before accessing the
data."
Why is this the case? Can one not disable/lock the process context
code instead of the bottom-half and access data?
Similarly, for the statement,
"If interrupt context code and a bottom half share data, you need to
disable interrupts and obtain a lock before accessing the data."
Any help in clarifying this would be much appreciated.
Thanks,
Pratyush
More information about the Kernelnewbies
mailing list