void fluke_thread_interrupt(fluke_thread_t *thread);
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.
- thread
- The thread to interrupt. The specified thread must not be the current thread; otherwise the results are undefined.
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.
fluke_thread_enable_exceptions, fluke_thread_disable_exceptions, fluke_thread_set_handlers