mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-03-01 01:40:26 -05:00
make O_CLOEXEC, O_NONBLOCK and socket low latency fd ops more uniform: always return void, name them similarly, only pass a single fd
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1867 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
0fcad97782
commit
75f799a3d8
16 changed files with 105 additions and 123 deletions
|
|
@ -498,10 +498,10 @@ static int context_connect_spawn(pa_context *c) {
|
|||
goto fail;
|
||||
}
|
||||
|
||||
pa_fd_set_cloexec(fds[0], 1);
|
||||
pa_make_fd_cloexec(fds[0]);
|
||||
|
||||
pa_socket_low_delay(fds[0]);
|
||||
pa_socket_low_delay(fds[1]);
|
||||
pa_make_socket_low_delay(fds[0]);
|
||||
pa_make_socket_low_delay(fds[1]);
|
||||
|
||||
if (c->spawn_api.prefork)
|
||||
c->spawn_api.prefork();
|
||||
|
|
|
|||
|
|
@ -123,10 +123,10 @@ int pa_signal_init(pa_mainloop_api *a) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
pa_make_nonblock_fd(signal_pipe[0]);
|
||||
pa_make_nonblock_fd(signal_pipe[1]);
|
||||
pa_assert_se(pa_fd_set_cloexec(signal_pipe[0], 1) == 0);
|
||||
pa_assert_se(pa_fd_set_cloexec(signal_pipe[1], 1) == 0);
|
||||
pa_make_fd_nonblock(signal_pipe[0]);
|
||||
pa_make_fd_nonblock(signal_pipe[1]);
|
||||
pa_make_fd_cloexec(signal_pipe[0]);
|
||||
pa_make_fd_cloexec(signal_pipe[1]);
|
||||
|
||||
api = a;
|
||||
|
||||
|
|
|
|||
|
|
@ -457,10 +457,10 @@ pa_mainloop *pa_mainloop_new(void) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
pa_make_nonblock_fd(m->wakeup_pipe[0]);
|
||||
pa_make_nonblock_fd(m->wakeup_pipe[1]);
|
||||
pa_fd_set_cloexec(m->wakeup_pipe[0], 1);
|
||||
pa_fd_set_cloexec(m->wakeup_pipe[1], 1);
|
||||
pa_make_fd_nonblock(m->wakeup_pipe[0]);
|
||||
pa_make_fd_nonblock(m->wakeup_pipe[1]);
|
||||
pa_make_fd_cloexec(m->wakeup_pipe[0]);
|
||||
pa_make_fd_cloexec(m->wakeup_pipe[1]);
|
||||
m->wakeup_requested = 0;
|
||||
|
||||
PA_LLIST_HEAD_INIT(pa_io_event, m->io_events);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue