Lines Matching refs:strong
853 static int binder_inc_node_nilocked(struct binder_node *node, int strong,
862 if (strong) {
869 pr_err("invalid inc strong node for %d\n",
902 static int binder_inc_node(struct binder_node *node, int strong, int internal,
908 ret = binder_inc_node_nilocked(node, strong, internal, target_list);
915 int strong, int internal)
922 if (strong) {
974 static void binder_dec_node(struct binder_node *node, int strong, int internal)
979 free_node = binder_dec_node_nilocked(node, strong, internal);
1046 * and cleanup is needed. Calling with strong=0 and internal=1
1074 } else if (need_strong_ref && !ref->data.strong) {
1075 binder_user_error("tried to use weak ref as strong ref\n");
1181 if (ref->data.strong)
1213 * @strong: if true, strong increment, else weak
1220 static int binder_inc_ref_olocked(struct binder_ref *ref, int strong,
1225 if (strong) {
1226 if (ref->data.strong == 0) {
1231 ref->data.strong++;
1246 * @strong: if true, strong decrement, else weak
1252 static bool binder_dec_ref_olocked(struct binder_ref *ref, int strong)
1254 if (strong) {
1255 if (ref->data.strong == 0) {
1256 binder_user_error("%d invalid dec strong, ref %d desc %d s %d w %d\n",
1258 ref->data.desc, ref->data.strong,
1262 ref->data.strong--;
1263 if (ref->data.strong == 0)
1264 binder_dec_node(ref->node, strong, 1);
1269 ref->data.desc, ref->data.strong,
1275 if (ref->data.strong == 0 && ref->data.weak == 0) {
1286 * @need_strong_ref: if true, only return node if ref is strong
1291 * Return: a binder_node or NULL if not found or not strong when strong required
1342 * @strong: true=strong reference, false=weak reference
1351 uint32_t desc, bool increment, bool strong,
1359 ref = binder_get_ref_olocked(proc, desc, strong);
1365 ret = binder_inc_ref_olocked(ref, strong, NULL);
1367 delete_ref = binder_dec_ref_olocked(ref, strong);
1386 * @strong: true=strong reference, false=weak reference
1394 uint32_t desc, bool strong, struct binder_ref_data *rdata)
1396 return binder_update_ref_for_handle(proc, desc, false, strong, rdata);
1404 * @strong: true=strong reference, false=weak reference
1415 bool strong,
1433 ret = binder_inc_ref_olocked(ref, strong, target_list);
1440 * with strong=0 and a tmp_refs will not decrement
2889 * since it has a reference to the target. The local strong ref keeps it
2892 * counting bug, relying on the local strong ref can fail.
2894 * Since user-space can cause the local strong ref to go away, we also take
3055 * There must already be a strong ref
3056 * on this node. If so, do a strong
3898 bool strong = cmd == BC_ACQUIRE || cmd == BC_RELEASE;
3921 strong, NULL, &rdata);
3927 proc, target, increment, strong,
3952 strong, target, ret);
3958 rdata.debug_id, rdata.desc, rdata.strong,
4185 ref->data.desc, ref->data.strong,
4568 int strong, weak;
4577 strong = node->internal_strong_refs ||
4581 node->tmp_refs || strong;
4590 if (strong && !has_strong_ref) {
4595 if (!strong && has_strong_ref)
4599 if (!weak && !strong) {
4628 if (!ret && strong && !has_strong_ref)
4633 if (!ret && !strong && has_strong_ref)
6278 ref->node->debug_id, ref->data.strong,
6455 int count, strong, weak, ready_threads;
6483 strong = 0;
6490 strong += ref->data.strong;
6494 seq_printf(m, " refs: %d s %d w %d\n", count, strong, weak);