VLC 4.0.0-dev
|
Typedefs | |
typedef struct vlc_interrupt | vlc_interrupt_t |
Functions | |
vlc_interrupt_t * | vlc_interrupt_create (void) |
Creates an interruption context. | |
void | vlc_interrupt_destroy (vlc_interrupt_t *) |
Destroys an interrupt context. | |
vlc_interrupt_t * | vlc_interrupt_set (vlc_interrupt_t *) |
Sets the interruption context for the calling thread. | |
void | vlc_interrupt_raise (vlc_interrupt_t *) |
Raises an interruption through a specified context. | |
void | vlc_interrupt_kill (vlc_interrupt_t *) |
Marks the interruption context as "killed". | |
bool | vlc_killed (void) |
Checks if the interruption context was "killed". | |
void | vlc_interrupt_forward_start (vlc_interrupt_t *to, void *data[2]) |
Enables forwarding of interruption. | |
int | vlc_interrupt_forward_stop (void *const data[2]) |
Undoes vlc_interrupt_forward_start(). | |
typedef struct vlc_interrupt vlc_interrupt_t |
vlc_interrupt_t * vlc_interrupt_create | ( | void | ) |
Creates an interruption context.
References likely, and vlc_interrupt_init().
Referenced by addons_manager_New().
void vlc_interrupt_destroy | ( | vlc_interrupt_t * | ctx | ) |
Destroys an interrupt context.
References vlc_interrupt_deinit().
Referenced by addons_manager_New().
void vlc_interrupt_forward_start | ( | vlc_interrupt_t * | to, |
void * | data[2] | ||
) |
Enables forwarding of interruption.
If an interruption is raised through the context of the calling thread, it will be forwarded to the specified other context. This is used to cross thread boundaries.
If the calling thread has no interrupt context, this function does nothing.
to | context to forward to |
data | opaque data pointer for the callback |
References vlc_interrupt_forward_wake(), vlc_interrupt_prepare(), and vlc_interrupt_var.
int vlc_interrupt_forward_stop | ( | void *const | data[2] | ) |
Undoes vlc_interrupt_forward_start().
This function must be called after each successful call to vlc_interrupt_forward_start() before any other interruptible call is made in the same thread.
If an interruption was raised against the context of the calling thread (after the previous call to vlc_interrupt_forward_start()), it is dequeued.
If the calling thread has no interrupt context, this function does nothing and returns zero.
References vlc_interrupt_finish(), and vlc_interrupt_forward_wake().
void vlc_interrupt_kill | ( | vlc_interrupt_t * | ctx | ) |
Marks the interruption context as "killed".
This is not reversible.
References vlc_interrupt::killed, and vlc_interrupt_raise().
Referenced by addons_manager_Delete(), input_Stop(), and vlc_interrupt_forward_wake().
void vlc_interrupt_raise | ( | vlc_interrupt_t * | ctx | ) |
Raises an interruption through a specified context.
This is used to asynchronously wake a thread up while it is waiting on some other events (typically I/O events).
References vlc_interrupt::callback, vlc_interrupt::data, vlc_interrupt::interrupted, vlc_interrupt::lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by vlc_interrupt_forward_wake(), and vlc_interrupt_kill().
vlc_interrupt_t * vlc_interrupt_set | ( | vlc_interrupt_t * | newctx | ) |
Sets the interruption context for the calling thread.
newctx | the interruption context to attach or NULL for none |
References vlc_interrupt_var.
Referenced by FinderThread(), InstallerThread(), Preparse(), Run(), RunDownloader(), RunSearchLocal(), and RunSearchNetwork().
bool vlc_killed | ( | void | ) |
Checks if the interruption context was "killed".
Indicates whether the interruption context of the calling thread (if any) was killed with vlc_interrupt_kill().
References vlc_interrupt::killed, and vlc_interrupt_var.
Referenced by AStreamReadBlock(), AStreamReadStream(), get_dialog_provider(), net_Connect(), net_Read(), net_Write(), RunDownloader(), vlc_credential_get(), vlc_stream_ReadBlock(), vlc_stream_ReadRaw(), vlc_tls_ClientSessionCreate(), vlc_tls_Read(), vlc_tls_WaitConnect(), and vlc_tls_Write().