STRUCT BINDER_PROC(9)
๐ NAME ๐
struct binder_proc โ binder process bookkeeping ๐
Hey bestie, welcome to the struct binder_proc(9) page from the Kernel API Manual โจ This is the bookkeeping struct for binder processes, and it's honestly giving the main-character planner of the whole operation ๐๐
โจ SYNOPSIS โจ
Here's the exact struct, bestie โ every field in its assigned little seat ๐ชโจ:
struct binder_proc {
struct hlist_node proc_node;
struct rb_root threads;
struct rb_root nodes;
struct rb_root refs_by_desc;
struct rb_root refs_by_node;
struct list_head waiting_threads;
int pid;
struct task_struct *tsk;
const struct cred *cred;
struct hlist_node deferred_work_node;
int deferred_work;
int outstanding_txns;
bool is_dead;
bool is_frozen;
bool sync_recv;
bool async_recv;
wait_queue_head_t freeze_wait;
struct dbitmap dmap;
struct list_head todo;
struct binder_stats stats;
struct list_head delivered_death;
struct list_head delivered_freeze;
u32 max_threads;
int requested_threads;
int requested_threads_started;
int tmp_ref;
long default_priority;
struct dentry *debugfs_entry;
struct binder_alloc alloc;
struct binder_context *context;
spinlock_t inner_lock;
spinlock_t outer_lock;
struct dentry *binderfs_entry;
bool oneway_spam_detection_enabled;
};
๐ง Members ๐ง
Okay, member-by-member tea time โ โ all the lock notes are staying, no cap:
proc_nodeโ the element for thebinder_procslist ๐threadsโ an rbtree ofbinder_threadsin this proc (protected byinner_lock) ๐ณnodesโ an rbtree of binder nodes associated with this proc, ordered bynode->ptr(protected byinner_lock) ๐งญrefs_by_descโ an rbtree of refs ordered byref->desc(protected byouter_lock) ๐refs_by_nodeโ an rbtree of refs ordered byref->node(protected byouter_lock) ๐๏ธwaiting_threadsโ threads currently waiting for proc work (protected byinner_lock) โณpidโ PID ofgroup_leaderof process (invariant after initialized) ๐tskโtask_structforgroup_leaderof process (invariant after initialized) ๐งตcredโstruct credassociated with thestruct fileinbinder_open(invariant after initialized) ๐ชชdeferred_work_nodeโ element forbinder_deferred_list(protected bybinder_deferred_lock) ๐deferred_workโ bitmap of deferred work to perform (protected bybinder_deferred_lock) ๐๏ธoutstanding_txnsโ number of transactions to be transmitted before processes infreeze_waitare woken up (protected byinner_lock) ๐is_deadโ process is dead and awaiting free when outstanding transactions are cleaned up (protected byinner_lock) ๐is_frozenโ process is frozen and unable to service binder transactions (protected byinner_lock) ๐งsync_recvโ process received sync transactions since last frozen; bit0: received sync transaction after being frozen; bit1: new pending sync transaction during freezing (protected byinner_lock) ๐ฅasync_recvโ process received async transactions since last frozen (protected byinner_lock) ๐จfreeze_waitโ waitqueue of processes waiting for all outstanding transactions to be processed (protected byinner_lock) ๐ฐ๏ธdmapโdbitmapto manage available reference descriptors (protected byouter_lock) ๐บ๏ธtodoโ list of work for this process (protected byinner_lock) โstatsโ per-process binder statistics (atomics, no lock needed) ๐delivered_deathโ list of delivered death notification (protected byinner_lock) ๐ชฆdelivered_freezeโ list of delivered freeze notification (protected byinner_lock) โ๏ธmax_threadsโ cap on number of binder threads (protected byinner_lock) ๐ฆrequested_threadsโ number of binder threads requested but not yet started; in current implementation, can only be0or1(protected byinner_lock) ๐โโ๏ธrequested_threads_startedโ number binder threads started (protected byinner_lock) ๐tmp_refโ temporary reference to indicate proc is in use (protected byinner_lock) ๐default_priorityโ default scheduler priority (invariant after initialized) ๐๏ธdebugfs_entryโ debugfs node ๐allocโ binder allocator bookkeeping ๐งฎcontextโbinder_contextfor this proc (invariant after initialized) ๐งinner_lockโ can nest underouter_lockand/or node lock ๐outer_lockโ no nesting under innor or node lock; Lock order: 1) outer, 2) node, 3) inner ๐จbinderfs_entryโ process-specific binderfs log file ๐oneway_spam_detection_enabledโ process enabled oneway spam detection or not ๐ซ
๐ซ Description ๐ซ
Bookkeeping structure for binder processes โ literally that, bestie. It's the planner, the ledger, the whole binder-process vibe in one struct ๐๐
๐ฅ SEE ALSO ๐ฅ
Kernel file ./drivers/android/binder_internal.h โ plus the whole squad of structs:
struct binder_device(9)struct binder_work(9)struct binder_node(9)struct binder_ref_data(9)struct binder_ref(9)struct binder_thread(9)struct binder_txn_fd_fixup(9)struct binder_object(9)
That's the page, bestie ๐ Source/version: ./drivers/android ยท date: October 2026 ยท page: struct binder_proc(9) โ slay and goodbye ๐๐
๐ฆ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms