Lines Matching defs:strong

817 static int binder_inc_node_nilocked(struct binder_node *node, int strong,
826 if (strong) {
833 pr_err("invalid inc strong node for %d\n",
866 static int binder_inc_node(struct binder_node *node, int strong, int internal,
872 ret = binder_inc_node_nilocked(node, strong, internal, target_list);
879 int strong, int internal)
886 if (strong) {
938 static void binder_dec_node(struct binder_node *node, int strong, int internal)
943 free_node = binder_dec_node_nilocked(node, strong, internal);
1010 * and cleanup is needed. Calling with strong=0 and internal=1
1038 } else if (need_strong_ref && !ref->data.strong) {
1039 binder_user_error("tried to use weak ref as strong ref\n");
1145 if (ref->data.strong)
1177 * @strong: if true, strong increment, else weak
1184 static int binder_inc_ref_olocked(struct binder_ref *ref, int strong,
1189 if (strong) {
1190 if (ref->data.strong == 0) {
1195 ref->data.strong++;
1210 * @strong: if true, strong decrement, else weak
1216 static bool binder_dec_ref_olocked(struct binder_ref *ref, int strong)
1218 if (strong) {
1219 if (ref->data.strong == 0) {
1220 binder_user_error("%d invalid dec strong, ref %d desc %d s %d w %d\n",
1222 ref->data.desc, ref->data.strong,
1226 ref->data.strong--;
1227 if (ref->data.strong == 0)
1228 binder_dec_node(ref->node, strong, 1);
1233 ref->data.desc, ref->data.strong,
1239 if (ref->data.strong == 0 && ref->data.weak == 0) {
1250 * @need_strong_ref: if true, only return node if ref is strong
1255 * Return: a binder_node or NULL if not found or not strong when strong required
1306 * @strong: true=strong reference, false=weak reference
1315 uint32_t desc, bool increment, bool strong,
1323 ref = binder_get_ref_olocked(proc, desc, strong);
1329 ret = binder_inc_ref_olocked(ref, strong, NULL);
1331 delete_ref = binder_dec_ref_olocked(ref, strong);
1350 * @strong: true=strong reference, false=weak reference
1358 uint32_t desc, bool strong, struct binder_ref_data *rdata)
1360 return binder_update_ref_for_handle(proc, desc, false, strong, rdata);
1368 * @strong: true=strong reference, false=weak reference
1379 bool strong,
1397 ret = binder_inc_ref_olocked(ref, strong, target_list);
1404 * with strong=0 and a tmp_refs will not decrement
2855 * since it has a reference to the target. The local strong ref keeps it
2858 * counting bug, relying on the local strong ref can fail.
2860 * Since user-space can cause the local strong ref to go away, we also take
3021 * There must already be a strong ref
3022 * on this node. If so, do a strong
3842 bool strong = cmd == BC_ACQUIRE || cmd == BC_RELEASE;
3865 strong, NULL, &rdata);
3871 proc, target, increment, strong,
3896 strong, target, ret);
3902 rdata.debug_id, rdata.desc, rdata.strong,
4129 ref->data.desc, ref->data.strong,
4512 int strong, weak;
4521 strong = node->internal_strong_refs ||
4525 node->tmp_refs || strong;
4534 if (strong && !has_strong_ref) {
4539 if (!strong && has_strong_ref)
4543 if (!weak && !strong) {
4572 if (!ret && strong && !has_strong_ref)
4577 if (!ret && !strong && has_strong_ref)
6118 ref->node->debug_id, ref->data.strong,
6295 int count, strong, weak, ready_threads;
6323 strong = 0;
6330 strong += ref->data.strong;
6334 seq_printf(m, " refs: %d s %d w %d\n", count, strong, weak);