#include <assert.h>
#include <stdio.h>
#include <test.h>
test_subtask_status_t exports_test_f() { return TEST_CALLBACK_CODE_YIELD; }
uint32_t main_tid = 0;
uint32_t spawned_tid = 0;
void thread_start(void *arg) {
test_thread_yield();
test_thread_yield_cancellable();
test_thread_suspend();
test_thread_suspend_cancellable();
test_thread_yield_to_suspended(main_tid);
test_thread_yield_to_suspended_cancellable(main_tid);
test_thread_suspend_to_suspended(main_tid);
test_thread_suspend_to_suspended_cancellable(main_tid);
test_thread_suspend_to(main_tid);
test_thread_suspend_to_cancellable(main_tid);
test_thread_unsuspend(main_tid);
}
test_subtask_status_t exports_test_f_callback(test_event_t *event) {
assert(event->event == TEST_EVENT_NONE);
assert(event->waitable == 0);
assert(event->code == 0);
main_tid = test_thread_index();
spawned_tid = test_thread_new_indirect(thread_start, &main_tid);
test_thread_yield_to_suspended(spawned_tid); test_thread_yield(); test_thread_yield(); test_thread_yield_to_suspended(spawned_tid); test_thread_suspend_to_suspended(spawned_tid); test_thread_suspend(); test_thread_suspend(); test_thread_suspend_to_suspended(spawned_tid); test_thread_suspend_to_suspended(spawned_tid); test_thread_suspend_to_suspended(spawned_tid); test_thread_suspend_to_suspended(
spawned_tid); exports_test_f_return();
return TEST_CALLBACK_CODE_EXIT;
}