VLC 4.0.0-dev
|
Functions | |
int | vlc_sem_wait_i11e (vlc_sem_t *) |
Interruptible variant of vlc_sem_wait(). More... | |
int | vlc_mwait_i11e (vlc_tick_t) |
Interruptible variant of vlc_tick_wait(). More... | |
static int | vlc_msleep_i11e (vlc_tick_t delay) |
Interruptible variant of vlc_tick_sleep(). More... | |
int | vlc_poll_i11e (struct pollfd *, unsigned, int) |
Interruptible variant of poll(). More... | |
ssize_t | vlc_readv_i11e (int fd, struct iovec *, int) |
Wrapper for readv() that returns the EINTR error upon VLC I/O interruption. More... | |
ssize_t | vlc_writev_i11e (int fd, const struct iovec *, int) |
Wrapper for writev() that returns the EINTR error upon VLC I/O interruption. More... | |
ssize_t | vlc_read_i11e (int fd, void *, size_t) |
Wrapper for read() that returns the EINTR error upon VLC I/O interruption. More... | |
ssize_t | vlc_write_i11e (int fd, const void *, size_t) |
Wrapper for write() that returns the EINTR error upon VLC I/O interruption. More... | |
ssize_t | vlc_recvmsg_i11e (int fd, struct msghdr *, int flags) |
ssize_t | vlc_sendmsg_i11e (int fd, const struct msghdr *, int flags) |
ssize_t | vlc_recvfrom_i11e (int fd, void *, size_t, int flags, struct sockaddr *, socklen_t *) |
ssize_t | vlc_sendto_i11e (int fd, const void *, size_t, int flags, const struct sockaddr *, socklen_t) |
static ssize_t | vlc_recv_i11e (int fd, void *buf, size_t len, int flags) |
static ssize_t | vlc_send_i11e (int fd, const void *buf, size_t len, int flags) |
int | vlc_accept_i11e (int fd, struct sockaddr *, socklen_t *, bool) |
void | vlc_interrupt_register (void(*cb)(void *), void *opaque) |
Registers a custom interrupt handler. More... | |
int | vlc_interrupt_unregister (void) |
int vlc_accept_i11e | ( | int | fd, |
struct sockaddr * | addr, | ||
socklen_t * | addrlen, | ||
bool | nonblock | ||
) |
References POLLIN, vlc_accept(), and vlc_poll_sock().
void vlc_interrupt_register | ( | void(*)(void *) | cb, |
void * | opaque | ||
) |
Registers a custom interrupt handler.
Registers a custom callback as interrupt handler for the calling thread. The callback must be unregistered with vlc_interrupt_unregister() before thread termination and before any further callback registration.
If the calling thread has no interruption context, this function has no effects.
References vlc_interrupt_prepare(), and vlc_interrupt_var.
Referenced by dialog_wait(), FinderThread(), InstallerThread(), and vlc_h2_stream_lock().
int vlc_interrupt_unregister | ( | void | ) |
References vlc_interrupt_finish(), and vlc_interrupt_var.
Referenced by dialog_wait(), FinderThread(), InstallerThread(), and vlc_h2_stream_unlock().
|
inlinestatic |
Interruptible variant of vlc_tick_sleep().
Waits for a specified timeout duration or, if the calling thread has an interruption context, an interruption.
delay | timeout value (in microseconds) |
References vlc_mwait_i11e(), and vlc_tick_now().
int vlc_mwait_i11e | ( | vlc_tick_t | deadline | ) |
Interruptible variant of vlc_tick_wait().
Waits for a specified timestamp or, if the calling thread has an interruption context, an interruption.
References vlc_interrupt::interrupted, vlc_interrupt::lock, vlc_cleanup_pop, vlc_cleanup_push, vlc_cond_init(), vlc_cond_timedwait(), vlc_interrupt_finish(), vlc_interrupt_prepare(), vlc_interrupt_var, vlc_mutex_lock(), vlc_mutex_unlock(), vlc_mwait_i11e_cleanup(), vlc_mwait_i11e_wake(), and vlc_tick_wait().
Referenced by vlc_msleep_i11e().
int vlc_poll_i11e | ( | struct pollfd * | fds, |
unsigned | nfds, | ||
int | timeout | ||
) |
Interruptible variant of poll().
Waits for file descriptors I/O events, a timeout, a signal or a VLC I/O interruption. Except for VLC I/O interruptions, this function behaves just like the standard poll().
fds | table of events to wait for |
nfds | number of entries in the table |
timeout | time to wait in milliseconds or -1 for infinite |
References likely, poll(), unlikely, vlc_alloc(), vlc_cleanup_pop, vlc_cleanup_push, vlc_interrupt_var, and vlc_poll_i11e_inner().
Referenced by net_Connect(), vlc_poll_file(), vlc_tls_ClientSessionCreate(), vlc_tls_Read(), vlc_tls_WaitConnect(), and vlc_tls_Write().
ssize_t vlc_read_i11e | ( | int | fd, |
void * | buf, | ||
size_t | count | ||
) |
Wrapper for read() that returns the EINTR error upon VLC I/O interruption.
References count, and vlc_readv_i11e().
ssize_t vlc_readv_i11e | ( | int | fd, |
struct iovec * | iov, | ||
int | count | ||
) |
Wrapper for readv() that returns the EINTR error upon VLC I/O interruption.
References count, pollfd::fd, POLLIN, readv(), and vlc_poll_file().
Referenced by vlc_read_i11e().
|
inlinestatic |
References vlc_recvfrom_i11e().
Referenced by net_Read().
ssize_t vlc_recvfrom_i11e | ( | int | fd, |
void * | buf, | ||
size_t | len, | ||
int | flags, | ||
struct sockaddr * | addr, | ||
socklen_t * | addrlen | ||
) |
References vlc_recvmsg_i11e().
Referenced by vlc_recv_i11e().
ssize_t vlc_recvmsg_i11e | ( | int | fd, |
struct msghdr * | msg, | ||
int | flags | ||
) |
References POLLIN, recvmsg(), and vlc_poll_sock().
Referenced by vlc_recvfrom_i11e().
int vlc_sem_wait_i11e | ( | vlc_sem_t * | sem | ) |
Interruptible variant of vlc_sem_wait().
Waits on a semaphore like vlc_sem_wait(). If the calling thread has an interruption context (as set by vlc_interrupt_set()), and another thread invokes vlc_interrupt_raise() on that context, the semaphore is incremented.
References vlc_cleanup_pop, vlc_cleanup_push, vlc_interrupt_cleanup(), vlc_interrupt_finish(), vlc_interrupt_prepare(), vlc_interrupt_sem(), vlc_interrupt_var, and vlc_sem_wait().
Referenced by vlc_getaddrinfo_i11e().
|
inlinestatic |
References vlc_sendto_i11e().
Referenced by net_Write().
ssize_t vlc_sendmsg_i11e | ( | int | fd, |
const struct msghdr * | msg, | ||
int | flags | ||
) |
References POLLOUT, vlc_poll_sock(), and vlc_sendmsg().
Referenced by vlc_sendto_i11e().
ssize_t vlc_sendto_i11e | ( | int | fd, |
const void * | buf, | ||
size_t | len, | ||
int | flags, | ||
const struct sockaddr * | addr, | ||
socklen_t | addrlen | ||
) |
References vlc_sendmsg_i11e().
Referenced by vlc_send_i11e().
ssize_t vlc_write_i11e | ( | int | fd, |
const void * | buf, | ||
size_t | count | ||
) |
Wrapper for write() that returns the EINTR error upon VLC I/O interruption.
References count, and vlc_writev_i11e().
ssize_t vlc_writev_i11e | ( | int | fd, |
const struct iovec * | iov, | ||
int | count | ||
) |
Wrapper for writev() that returns the EINTR error upon VLC I/O interruption.
References count, pollfd::fd, POLLOUT, vlc_poll_file(), and vlc_writev().
Referenced by vlc_write_i11e().