Ejemplo n.º 1
0
void
_handle_tag_del(const char *path, const char *str)
{
  char *item = NULL;
  list_t new_tags;
  list_t tags;

  memset(&new_tags, 0, sizeof(list_t));
  memset(&tags,     0, sizeof(list_t));

  if (file_tags_get(path, &tags) > 0)
    return;

  list_parse_tags(&new_tags, str);

  while (list_items_walk(&new_tags, &item) > 0)
    list_item_del(&tags, item);

  list_items_merge(&tags, ' ');

  file_tags_set(path, &tags);

  list_clear(&tags);
  list_clear(&new_tags);
}
Ejemplo n.º 2
0
Archivo: sue-ipc.c Proyecto: tlauda/sof
void ipc_platform_send_msg(struct ipc *ipc)
{
	struct ipc_msg *msg;
	uint32_t flags;

	spin_lock_irq(&ipc->lock, flags);

	/* any messages to send ? */
	if (list_is_empty(&ipc->shared_ctx->msg_list)) {
		ipc->shared_ctx->dsp_pending = 0;
		goto out;
	}

	/* now send the message */
	msg = list_first_item(&ipc->shared_ctx->msg_list, struct ipc_msg,
			      list);
	mailbox_dspbox_write(0, msg->tx_data, msg->tx_size);
	list_item_del(&msg->list);
	ipc->shared_ctx->dsp_msg = msg;
	tracev_ipc("ipc: msg tx -> 0x%x", msg->header);

	/* now interrupt host to tell it we have message sent */

	list_item_append(&msg->list, &ipc->shared_ctx->empty_list);

out:
	spin_unlock_irq(&ipc->lock, flags);
}