void undo_hint_action(int hint_id)
{
    if (qcopt_handle) {
        if (perf_lock_rel) {
            /* Get hint-data associated with this hint-id */
            struct list_node *found_node;
            struct hint_data temp_hint_data = {
                .hint_id = hint_id
            };

            found_node = find_node(&active_hint_list_head,
                    &temp_hint_data);

            if (found_node) {
                /* Release this lock. */
                struct hint_data *found_hint_data =
                    (struct hint_data *)(found_node->data);

                if (found_hint_data) {
                    if (perf_lock_rel(found_hint_data->perflock_handle) == -1)
                        ALOGE("Perflock release failed.");
                }

                if (found_node->data) {
                    /* We can free the hint-data for this node. */
                    free(found_node->data);
                }

                remove_list_node(&active_hint_list_head, found_node);
            } else {
                ALOGE("Invalid hint ID.");
            }
        }
    }
}
예제 #2
0
파일: lists.c 프로젝트: KangDroid/gcc
/* Removes corresponding to ELEM node from the list pointed to by LISTP.
   Returns that node.  */
rtx
remove_list_elem (rtx elem, rtx *listp)
{
  rtx node;

  listp = find_list_elem (elem, listp);
  node = *listp;
  remove_list_node (listp);
  return node;
}
예제 #3
0
파일: lists.c 프로젝트: KangDroid/gcc
/* Remove and free the first node in the INSN_LIST pointed to by LISTP.  */
rtx_insn *
remove_free_INSN_LIST_node (rtx_insn_list **listp)
{
  rtx_insn_list *node = *listp;
  rtx_insn *elem = node->insn ();

  remove_list_node ((rtx *)listp);
  free_INSN_LIST_node (node);

  return elem;
}
예제 #4
0
파일: lists.c 프로젝트: KangDroid/gcc
/* Remove and free the first node in the EXPR_LIST pointed to by LISTP.  */
rtx
remove_free_EXPR_LIST_node (rtx_expr_list **listp)
{
  rtx_expr_list *node = *listp;
  rtx elem = XEXP (node, 0);

  remove_list_node ((rtx *)listp);
  free_EXPR_LIST_node (node);

  return elem;
}
/* Remove and free the first node in the EXPR_LIST pointed to by LISTP.  */
rtx
remove_free_EXPR_LIST_node (rtx *listp)
{
  rtx node = *listp;
  rtx elem = XEXP (node, 0);

  remove_list_node (listp);
  free_EXPR_LIST_node (node);

  return elem;
}