/* Show that threads can be aborted from interrupt context. 
Spwan a thread, then enter ISR context in main thread and abort the child thread. Check if ISR completed and target thread was aborted. */
ZTEST(threads_lifecycle, test_abort_from_isr_not_self)
/* Show that threads can be aborted from interrupt context. 
Spwan a thread, then enter ISR context in main thread and abort the child thread. Check if ISR completed and target thread was aborted. */
ZTEST(threads_lifecycle, test_abort_from_isr_not_self)
{
	k_tid_t tid;
	isr_finished = false;
	k_sem_init(&sem_abort, 0, 1);
	tid = k_thread_create(&tdata, tstack, STACK_SIZE, entry_aborted_thread,
			NULL, NULL, NULL, 0, 0, K_NO_WAIT);
	k_sem_take(&sem_abort, K_FOREVER);
	irq_offload(offload_func, (void *)tid);
	k_thread_join(&tdata, K_FOREVER);
	zassert_true(isr_finished, "ISR did not complete");
}