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:77
int vlc_interrupt_forward_stop(void *const data[2])
Undoes vlc_interrupt_forward_start().
Definition: interrupt.c:271
bool vlc_killed(void)
Checks if the interruption context was "killed".
Definition: interrupt.c:186
void vlc_interrupt_forward_start(vlc_interrupt_t *to, void *data[2])
Enables forwarding of interruption.
Definition: interrupt.c:257
vlc_interrupt_t * vlc_interrupt_create(void)
Creates an interruption context.
Definition: interrupt.c:60
void vlc_interrupt_kill(vlc_interrupt_t *)
Marks the interruption context as "killed".
Definition: interrupt.c:178
void vlc_interrupt_raise(vlc_interrupt_t *)
Raises an interruption through a specified context.
Definition: interrupt.c:84
vlc_interrupt_t * vlc_interrupt_set(vlc_interrupt_t *)
Sets the interruption context for the calling thread.
Definition: interrupt.c:99
ssize_t vlc_sendto_i11e(int fd, const void *, size_t, int flags, const struct sockaddr *, socklen_t)
Definition: interrupt.c:579
int vlc_accept_i11e(int fd, struct sockaddr *, socklen_t *, bool)
Definition: interrupt.c:621
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:512
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:536
ssize_t vlc_sendmsg_i11e(int fd, const struct msghdr *, int flags)
Definition: interrupt.c:570
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:198
ssize_t vlc_recvfrom_i11e(int fd, void *, size_t, int flags, struct sockaddr *, socklen_t *)
Definition: interrupt.c:552
void vlc_interrupt_register(void(*cb)(void *), void *opaque)
Registers a custom interrupt handler.
Definition: interrupt.c:160
int vlc_poll_i11e(struct pollfd *, unsigned, int)
Interruptible variant of poll().
Definition: interrupt.c:374
int vlc_mwait_i11e(vlc_tick_t)
Interruptible variant of vlc_tick_wait().
Definition: interrupt.c:226
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:498
ssize_t vlc_recvmsg_i11e(int fd, struct msghdr *, int flags)
Definition: interrupt.c:542
int vlc_interrupt_unregister(void)
Definition: interrupt.c:167
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:523
vlc_tick_t vlc_tick_now(void)
Precision monotonic clock.
Definition: thread.c:227
Definition: vlc_fixups.h:498
Definition: interrupt.h:33
void * data
Definition: interrupt.h:38
Semaphore.
Definition: vlc_threads.h:422
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:45