21#ifndef VLC_INTERRUPT_H
22# define VLC_INTERRUPT_H 1
25# include <sys/socket.h>
120 struct sockaddr *, socklen_t *);
122 const struct sockaddr *, socklen_t);
124static inline ssize_t
vlc_recv_i11e(
int fd,
void *buf,
size_t len,
int flags)
130ssize_t
vlc_send_i11e(
int fd,
const void *buf,
size_t len,
int flags)
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
void vlc_interrupt_destroy(vlc_interrupt_t *)
Destroys an interrupt context.
Definition interrupt.c:82
int vlc_interrupt_forward_stop(void *const data[2])
Undoes vlc_interrupt_forward_start().
Definition interrupt.c:279
bool vlc_killed(void)
Checks if the interruption context was "killed".
Definition interrupt.c:194
void vlc_interrupt_forward_start(vlc_interrupt_t *to, void *data[2])
Enables forwarding of interruption.
Definition interrupt.c:265
vlc_interrupt_t * vlc_interrupt_create(void)
Creates an interruption context.
Definition interrupt.c:65
void vlc_interrupt_kill(vlc_interrupt_t *)
Marks the interruption context as "killed".
Definition interrupt.c:186
void vlc_interrupt_raise(vlc_interrupt_t *)
Raises an interruption through a specified context.
Definition interrupt.c:89
vlc_interrupt_t * vlc_interrupt_set(vlc_interrupt_t *)
Sets the interruption context for the calling thread.
Definition interrupt.c:104
ssize_t vlc_sendto_i11e(int fd, const void *, size_t, int flags, const struct sockaddr *, socklen_t)
Definition interrupt.c:597
int vlc_accept_i11e(int fd, struct sockaddr *, socklen_t *, bool)
Definition interrupt.c:639
static int vlc_msleep_i11e(vlc_tick_t delay)
Interruptible variant of vlc_tick_sleep().
Definition vlc_interrupt.h:86
ssize_t vlc_writev_i11e(int fd, const struct iovec *, int)
Wrapper for writev() that returns the EINTR error upon VLC I/O interruption.
Definition interrupt.c:530
ssize_t vlc_write_i11e(int fd, const void *, size_t)
Wrapper for write() that returns the EINTR error upon VLC I/O interruption.
Definition interrupt.c:554
ssize_t vlc_sendmsg_i11e(int fd, const struct msghdr *, int flags)
Definition interrupt.c:588
static ssize_t vlc_recv_i11e(int fd, void *buf, size_t len, int flags)
Definition vlc_interrupt.h:125
static ssize_t vlc_send_i11e(int fd, const void *buf, size_t len, int flags)
Definition vlc_interrupt.h:131
int vlc_sem_wait_i11e(vlc_sem_t *)
Interruptible variant of vlc_sem_wait().
Definition interrupt.c:206
ssize_t vlc_recvfrom_i11e(int fd, void *, size_t, int flags, struct sockaddr *, socklen_t *)
Definition interrupt.c:570
void vlc_interrupt_register(void(*cb)(void *), void *opaque)
Registers a custom interrupt handler.
Definition interrupt.c:168
int vlc_poll_i11e(struct pollfd *, unsigned, int)
Interruptible variant of poll().
Definition interrupt.c:392
int vlc_mwait_i11e(vlc_tick_t)
Interruptible variant of vlc_tick_wait().
Definition interrupt.c:234
ssize_t vlc_readv_i11e(int fd, struct iovec *, int)
Wrapper for readv() that returns the EINTR error upon VLC I/O interruption.
Definition interrupt.c:516
ssize_t vlc_recvmsg_i11e(int fd, struct msghdr *, int flags)
Definition interrupt.c:560
int vlc_interrupt_unregister(void)
Definition interrupt.c:175
ssize_t vlc_read_i11e(int fd, void *, size_t)
Wrapper for read() that returns the EINTR error upon VLC I/O interruption.
Definition interrupt.c:541
vlc_tick_t vlc_tick_now(void)
Precision monotonic clock.
Definition thread.c:253
Definition vlc_fixups.h:501
Definition interrupt.h:33
void * data
Definition interrupt.h:38
Semaphore.
Definition vlc_threads.h:368
This file is a collection of common definitions and types.
Thread primitive declarations.
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48