void devil_test_thread(void) { devil_thread_t* thread; fprintf(stdout, "begin testing thread module : <%s>\n", __func__); thread = devil_thread_create(worker, (void*)34); DEVIL_ASSERT(NULL != thread); devil_thread_start(thread); devil_thread_join(thread); devil_thread_release(thread); fprintf(stdout, "end testing thread module : all passed!!!\n"); }
void devil_thread_release(devil_thread_t* thread) { devil_thread_join(thread); devil_free(thread); }