mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
double default asyncq size
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2386 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
876d5b408a
commit
21fa1cf857
1 changed files with 2 additions and 6 deletions
|
|
@ -40,7 +40,7 @@
|
||||||
#include "asyncq.h"
|
#include "asyncq.h"
|
||||||
#include "fdsem.h"
|
#include "fdsem.h"
|
||||||
|
|
||||||
#define ASYNCQ_SIZE 128
|
#define ASYNCQ_SIZE 256
|
||||||
|
|
||||||
/* For debugging purposes we can define _Y to put and extra thread
|
/* For debugging purposes we can define _Y to put and extra thread
|
||||||
* yield between each operation. */
|
* yield between each operation. */
|
||||||
|
|
@ -73,10 +73,6 @@ PA_STATIC_FLIST_DECLARE(localq, 0, pa_xfree);
|
||||||
|
|
||||||
#define PA_ASYNCQ_CELLS(x) ((pa_atomic_ptr_t*) ((uint8_t*) (x) + PA_ALIGN(sizeof(struct pa_asyncq))))
|
#define PA_ASYNCQ_CELLS(x) ((pa_atomic_ptr_t*) ((uint8_t*) (x) + PA_ALIGN(sizeof(struct pa_asyncq))))
|
||||||
|
|
||||||
static int is_power_of_two(unsigned size) {
|
|
||||||
return !(size & (size - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int reduce(pa_asyncq *l, int value) {
|
static int reduce(pa_asyncq *l, int value) {
|
||||||
return value & (unsigned) (l->size - 1);
|
return value & (unsigned) (l->size - 1);
|
||||||
}
|
}
|
||||||
|
|
@ -87,7 +83,7 @@ pa_asyncq *pa_asyncq_new(unsigned size) {
|
||||||
if (!size)
|
if (!size)
|
||||||
size = ASYNCQ_SIZE;
|
size = ASYNCQ_SIZE;
|
||||||
|
|
||||||
pa_assert(is_power_of_two(size));
|
pa_assert(pa_is_power_of_two(size));
|
||||||
|
|
||||||
l = pa_xmalloc0(PA_ALIGN(sizeof(pa_asyncq)) + (sizeof(pa_atomic_ptr_t) * size));
|
l = pa_xmalloc0(PA_ALIGN(sizeof(pa_asyncq)) + (sizeof(pa_atomic_ptr_t) * size));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue