next up previous contents
Next: 2.15 fluke_thread_move: move a Up: 2 Thread Previous: 2.13 fluke_thread_get_state: retrieve the

2.14 fluke_thread_interrupt: interrupt another thread

SYNOPSIS

void fluke_thread_interrupt(fluke_thread_t *thread);

DESCRIPTION

This operation posts a software interrupt to the specified thread. If the thread is currently running with exceptions enabled (i.e. its exception flag turned on), the thread will take the software interrupt immediately. If the target thread is waiting for some event, it will be woken up so that it can take the interrupt. However, if the target thread's exception enable flag is not set, then the thread will not actually take the exception until it turns on its exception enable flag again.

PARAMETERS

thread
The thread to interrupt. The specified thread must not be the current thread; otherwise the results are undefined.

ERRORS

If any of the following errors is detected by the Fluke implementation, it causes the current thread to take a synchronous exception with one of the following codes. All of these have an implicit FLUKE_INSANITY_ prefix.
NO_OBJECT
thread does not point to an active object.
NOT_THREAD
The object pointed to by thread is not a thread object.
INVALID_OBJECT
The state of the thread object has become invalid.
CURRENT_THREAD
A thread attempted to interrupt itself.

RELATED INFORMATION

fluke_thread_enable_exceptions, fluke_thread_disable_exceptions, fluke_thread_set_handlers



Utah Flux Research Group