mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
node: keep separate array of links
Keep a separate array with the links that we only access and update from the data-thread.
This commit is contained in:
parent
d3dd90bb05
commit
73e6272488
4 changed files with 121 additions and 28 deletions
|
|
@ -156,7 +156,6 @@ loop (void *user_data)
|
|||
|
||||
while (spa_ringbuffer_get_read_offset (&priv->buffer, &offset) > 0) {
|
||||
InvokeItem *item = SPA_MEMBER (priv->buffer_data, offset, InvokeItem);
|
||||
g_debug ("data-loop %p: invoke %d", this, item->seq);
|
||||
item->func (p, true, item->seq, item->size, item->data, item->user_data);
|
||||
spa_ringbuffer_read_advance (&priv->buffer, item->item_size);
|
||||
}
|
||||
|
|
@ -347,7 +346,10 @@ do_invoke (SpaPoll *poll,
|
|||
|
||||
wakeup_thread (this);
|
||||
|
||||
res = SPA_RESULT_RETURN_ASYNC (seq);
|
||||
if (seq != SPA_ID_INVALID)
|
||||
res = SPA_RESULT_RETURN_ASYNC (seq);
|
||||
else
|
||||
res = SPA_RESULT_OK;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue