Lines Matching full:strong

815 static int binder_inc_node_nilocked(struct binder_node *node, int strong,  in binder_inc_node_nilocked()  argument
824 if (strong) { in binder_inc_node_nilocked()
831 pr_err("invalid inc strong node for %d\n", in binder_inc_node_nilocked()
864 static int binder_inc_node(struct binder_node *node, int strong, int internal, in binder_inc_node() argument
870 ret = binder_inc_node_nilocked(node, strong, internal, target_list); in binder_inc_node()
877 int strong, int internal) in binder_dec_node_nilocked() argument
884 if (strong) { in binder_dec_node_nilocked()
936 static void binder_dec_node(struct binder_node *node, int strong, int internal) in binder_dec_node() argument
941 free_node = binder_dec_node_nilocked(node, strong, internal); in binder_dec_node()
1008 * and cleanup is needed. Calling with strong=0 and internal=1 in binder_dec_node_tmpref()
1036 } else if (need_strong_ref && !ref->data.strong) { in binder_get_ref_olocked()
1037 binder_user_error("tried to use weak ref as strong ref\n"); in binder_get_ref_olocked()
1202 if (ref->data.strong) in binder_cleanup_ref_olocked()
1234 * @strong: if true, strong increment, else weak
1241 static int binder_inc_ref_olocked(struct binder_ref *ref, int strong, in binder_inc_ref_olocked() argument
1246 if (strong) { in binder_inc_ref_olocked()
1247 if (ref->data.strong == 0) { in binder_inc_ref_olocked()
1252 ref->data.strong++; in binder_inc_ref_olocked()
1267 * @strong: if true, strong decrement, else weak
1273 static bool binder_dec_ref_olocked(struct binder_ref *ref, int strong) in binder_dec_ref_olocked() argument
1275 if (strong) { in binder_dec_ref_olocked()
1276 if (ref->data.strong == 0) { in binder_dec_ref_olocked()
1277 binder_user_error("%d invalid dec strong, ref %d desc %d s %d w %d\n", in binder_dec_ref_olocked()
1279 ref->data.desc, ref->data.strong, in binder_dec_ref_olocked()
1283 ref->data.strong--; in binder_dec_ref_olocked()
1284 if (ref->data.strong == 0) in binder_dec_ref_olocked()
1285 binder_dec_node(ref->node, strong, 1); in binder_dec_ref_olocked()
1290 ref->data.desc, ref->data.strong, in binder_dec_ref_olocked()
1296 if (ref->data.strong == 0 && ref->data.weak == 0) { in binder_dec_ref_olocked()
1307 * @need_strong_ref: if true, only return node if ref is strong
1312 * Return: a binder_node or NULL if not found or not strong when strong required
1383 * @strong: true=strong reference, false=weak reference
1392 uint32_t desc, bool increment, bool strong, in binder_update_ref_for_handle() argument
1400 ref = binder_get_ref_olocked(proc, desc, strong); in binder_update_ref_for_handle()
1406 ret = binder_inc_ref_olocked(ref, strong, NULL); in binder_update_ref_for_handle()
1408 delete_ref = binder_dec_ref_olocked(ref, strong); in binder_update_ref_for_handle()
1429 * @strong: true=strong reference, false=weak reference
1437 uint32_t desc, bool strong, struct binder_ref_data *rdata) in binder_dec_ref_for_handle() argument
1439 return binder_update_ref_for_handle(proc, desc, false, strong, rdata); in binder_dec_ref_for_handle()
1447 * @strong: true=strong reference, false=weak reference
1458 bool strong, in binder_inc_ref_for_node() argument
1476 ret = binder_inc_ref_olocked(ref, strong, target_list); in binder_inc_ref_for_node()
1483 * with strong=0 and a tmp_refs will not decrement in binder_inc_ref_for_node()
2934 * since it has a reference to the target. The local strong ref keeps it
2937 * counting bug, relying on the local strong ref can fail.
2939 * Since user-space can cause the local strong ref to go away, we also take
3100 * There must already be a strong ref in binder_transaction()
3101 * on this node. If so, do a strong in binder_transaction()
4071 bool strong = cmd == BC_ACQUIRE || cmd == BC_RELEASE; in binder_thread_write() local
4094 strong, NULL, &rdata); in binder_thread_write()
4100 proc, target, increment, strong, in binder_thread_write()
4125 strong, target, ret); in binder_thread_write()
4131 rdata.debug_id, rdata.desc, rdata.strong, in binder_thread_write()
4358 ref->data.desc, ref->data.strong, in binder_thread_write()
4779 int strong, weak; in binder_thread_read() local
4788 strong = node->internal_strong_refs || in binder_thread_read()
4792 node->tmp_refs || strong; in binder_thread_read()
4801 if (strong && !has_strong_ref) { in binder_thread_read()
4806 if (!strong && has_strong_ref) in binder_thread_read()
4810 if (!weak && !strong) { in binder_thread_read()
4839 if (!ret && strong && !has_strong_ref) in binder_thread_read()
4844 if (!ret && !strong && has_strong_ref) in binder_thread_read()
6474 ref->node->debug_id, ref->data.strong, in print_binder_ref_olocked()
6657 int count, strong, weak, ready_threads; in print_binder_proc_stats() local
6685 strong = 0; in print_binder_proc_stats()
6692 strong += ref->data.strong; in print_binder_proc_stats()
6696 seq_printf(m, " refs: %d s %d w %d\n", count, strong, weak); in print_binder_proc_stats()