mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-28 08:57:11 -05:00
make pa_mempool_stat thread-safe/lock-free
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1343 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
327e0cd8e1
commit
5264d235d2
5 changed files with 74 additions and 69 deletions
|
|
@ -1112,10 +1112,10 @@ static void command_stat(PA_GCC_UNUSED pa_pdispatch *pd, PA_GCC_UNUSED uint32_t
|
|||
stat = pa_mempool_get_stat(c->protocol->core->mempool);
|
||||
|
||||
reply = reply_new(tag);
|
||||
pa_tagstruct_putu32(reply, stat->n_allocated);
|
||||
pa_tagstruct_putu32(reply, stat->allocated_size);
|
||||
pa_tagstruct_putu32(reply, stat->n_accumulated);
|
||||
pa_tagstruct_putu32(reply, stat->accumulated_size);
|
||||
pa_tagstruct_putu32(reply, (uint32_t) AO_load_acquire_read((AO_t*) &stat->n_allocated));
|
||||
pa_tagstruct_putu32(reply, (uint32_t) AO_load_acquire_read((AO_t*) &stat->allocated_size));
|
||||
pa_tagstruct_putu32(reply, (uint32_t) AO_load_acquire_read((AO_t*) &stat->n_accumulated));
|
||||
pa_tagstruct_putu32(reply, (uint32_t) AO_load_acquire_read((AO_t*) &stat->accumulated_size));
|
||||
pa_tagstruct_putu32(reply, pa_scache_total_size(c->protocol->core));
|
||||
pa_pstream_send_tagstruct(c->pstream, reply);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue