summaryrefslogtreecommitdiffstats
path: root/lib/crc4.c
diff options
context:
space:
mode:
authorTodd Kjos <tkjos@android.com>2017-06-29 12:02:00 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-17 14:48:23 +0200
commit9630fe8839baf3f47df9187ca720cfa1c10b132e (patch)
tree884b9d5e174886a29eb66dc76698f70066508f26 /lib/crc4.c
parentadc1884222276df6eb018f78bccacbcd78a0b9f6 (diff)
downloadlinux-9630fe8839baf3f47df9187ca720cfa1c10b132e.tar.bz2
binder: introduce locking helper functions
There are 3 main spinlocks which must be acquired in this order: 1) proc->outer_lock : protects most fields of binder_proc, binder_thread, and binder_ref structures. binder_proc_lock() and binder_proc_unlock() are used to acq/rel. 2) node->lock : protects most fields of binder_node. binder_node_lock() and binder_node_unlock() are used to acq/rel 3) proc->inner_lock : protects the thread and node lists (proc->threads, proc->nodes) and all todo lists associated with the binder_proc (proc->todo, thread->todo, proc->delivered_death and node->async_todo). binder_inner_proc_lock() and binder_inner_proc_unlock() are used to acq/rel Any lock under procA must never be nested under any lock at the same level or below on procB. Functions that require a lock held on entry indicate which lock in the suffix of the function name: foo_olocked() : requires node->outer_lock foo_nlocked() : requires node->lock foo_ilocked() : requires proc->inner_lock foo_iolocked(): requires proc->outer_lock and proc->inner_lock foo_nilocked(): requires node->lock and proc->inner_lock Signed-off-by: Todd Kjos <tkjos@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/crc4.c')
0 files changed, 0 insertions, 0 deletions