A lot of more work to get the lock-free stuff in place

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1474 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-06-13 22:08:14 +00:00
parent 69115687ad
commit be4a882836
33 changed files with 908 additions and 694 deletions

View file

@ -49,7 +49,7 @@ static void the_thread(void *_q) {
do {
int code = 0;
pa_assert_se(pa_asyncmsgq_get(q, NULL, &code, NULL, 1) == 0);
pa_assert_se(pa_asyncmsgq_get(q, NULL, &code, NULL, NULL, 1) == 0);
switch (code) {
@ -71,7 +71,7 @@ static void the_thread(void *_q) {
break;
}
pa_asyncmsgq_done(q);
pa_asyncmsgq_done(q, 0);
} while (!quit);
}
@ -91,11 +91,11 @@ int main(int argc, char *argv[]) {
printf("Operation B post\n");
pa_asyncmsgq_post(q, NULL, OPERATION_B, NULL, NULL, NULL);
pa_thread_yield();
printf("Operation C send\n");
pa_asyncmsgq_send(q, NULL, OPERATION_C, NULL);
pa_asyncmsgq_send(q, NULL, OPERATION_C, NULL, NULL);
pa_thread_yield();