Lines Matching full:strong
820 static int binder_inc_node_nilocked(struct binder_node *node, int strong, in binder_inc_node_nilocked() argument
829 if (strong) { in binder_inc_node_nilocked()
836 pr_err("invalid inc strong node for %d\n", in binder_inc_node_nilocked()
860 static int binder_inc_node(struct binder_node *node, int strong, int internal, in binder_inc_node() argument
866 ret = binder_inc_node_nilocked(node, strong, internal, target_list); in binder_inc_node()
873 int strong, int internal) in binder_dec_node_nilocked() argument
880 if (strong) { in binder_dec_node_nilocked()
932 static void binder_dec_node(struct binder_node *node, int strong, int internal) in binder_dec_node() argument
937 free_node = binder_dec_node_nilocked(node, strong, internal); in binder_dec_node()
1004 * and cleanup is needed. Calling with strong=0 and internal=1 in binder_dec_node_tmpref()
1032 } else if (need_strong_ref && !ref->data.strong) { in binder_get_ref_olocked()
1033 binder_user_error("tried to use weak ref as strong ref\n"); in binder_get_ref_olocked()
1198 if (ref->data.strong) in binder_cleanup_ref_olocked()
1236 * @strong: if true, strong increment, else weak
1243 static int binder_inc_ref_olocked(struct binder_ref *ref, int strong, in binder_inc_ref_olocked() argument
1248 if (strong) { in binder_inc_ref_olocked()
1249 if (ref->data.strong == 0) { in binder_inc_ref_olocked()
1254 ref->data.strong++; in binder_inc_ref_olocked()
1269 * @strong: if true, strong decrement, else weak
1275 static bool binder_dec_ref_olocked(struct binder_ref *ref, int strong) in binder_dec_ref_olocked() argument
1277 if (strong) { in binder_dec_ref_olocked()
1278 if (ref->data.strong == 0) { in binder_dec_ref_olocked()
1279 binder_user_error("%d invalid dec strong, ref %d desc %d s %d w %d\n", in binder_dec_ref_olocked()
1281 ref->data.desc, ref->data.strong, in binder_dec_ref_olocked()
1285 ref->data.strong--; in binder_dec_ref_olocked()
1286 if (ref->data.strong == 0) in binder_dec_ref_olocked()
1287 binder_dec_node(ref->node, strong, 1); in binder_dec_ref_olocked()
1292 ref->data.desc, ref->data.strong, in binder_dec_ref_olocked()
1298 if (ref->data.strong == 0 && ref->data.weak == 0) { in binder_dec_ref_olocked()
1309 * @need_strong_ref: if true, only return node if ref is strong
1314 * Return: a binder_node or NULL if not found or not strong when strong required
1385 * @strong: true=strong reference, false=weak reference
1394 uint32_t desc, bool increment, bool strong, in binder_update_ref_for_handle() argument
1402 ref = binder_get_ref_olocked(proc, desc, strong); in binder_update_ref_for_handle()
1408 ret = binder_inc_ref_olocked(ref, strong, NULL); in binder_update_ref_for_handle()
1410 delete_ref = binder_dec_ref_olocked(ref, strong); in binder_update_ref_for_handle()
1431 * @strong: true=strong reference, false=weak reference
1439 uint32_t desc, bool strong, struct binder_ref_data *rdata) in binder_dec_ref_for_handle() argument
1441 return binder_update_ref_for_handle(proc, desc, false, strong, rdata); in binder_dec_ref_for_handle()
1449 * @strong: true=strong reference, false=weak reference
1460 bool strong, in binder_inc_ref_for_node() argument
1478 ret = binder_inc_ref_olocked(ref, strong, target_list); in binder_inc_ref_for_node()
1485 * with strong=0 and a tmp_refs will not decrement in binder_inc_ref_for_node()
2935 * since it has a reference to the target. The local strong ref keeps it
2938 * counting bug, relying on the local strong ref can fail.
2940 * Since user-space can cause the local strong ref to go away, we also take
3189 * There must already be a strong ref in binder_transaction()
3190 * on this node. If so, do a strong in binder_transaction()
4132 bool strong = cmd == BC_ACQUIRE || cmd == BC_RELEASE; in binder_thread_write() local
4155 strong, NULL, &rdata); in binder_thread_write()
4161 proc, target, increment, strong, in binder_thread_write()
4186 strong, target, ret); in binder_thread_write()
4192 rdata.debug_id, rdata.desc, rdata.strong, in binder_thread_write()
4420 ref->data.desc, ref->data.strong, in binder_thread_write()
4841 int strong, weak; in binder_thread_read() local
4850 strong = node->internal_strong_refs || in binder_thread_read()
4854 node->tmp_refs || strong; in binder_thread_read()
4863 if (strong && !has_strong_ref) { in binder_thread_read()
4868 if (!strong && has_strong_ref) in binder_thread_read()
4872 if (!weak && !strong) { in binder_thread_read()
4901 if (!ret && strong && !has_strong_ref) in binder_thread_read()
4906 if (!ret && !strong && has_strong_ref) in binder_thread_read()
6556 ref->node->debug_id, ref->data.strong, in print_binder_ref_olocked()
6776 int count, strong, weak, ready_threads; in print_binder_proc_stats() local
6804 strong = 0; in print_binder_proc_stats()
6811 strong += ref->data.strong; in print_binder_proc_stats()
6815 seq_printf(m, " refs: %d s %d w %d\n", count, strong, weak); in print_binder_proc_stats()