void exo_loop_start() { struct pt driver_pt; PT_INIT(&driver_pt); while(PT_SCHEDULE(driver_thread(&driver_pt))) { } }
int main(void) { struct pt driver_pt; PT_INIT(&driver_pt); while(PT_SCHEDULE(driver_thread(&driver_pt))) { /* * When running this example on a multitasking system, we must * give other processes a chance to run too and therefore we call * usleep() resp. Sleep() here. On a dedicated embedded system, * we usually do not need to do this. */ #ifdef _WIN32 Sleep(0); #else usleep(10); #endif } return 0; }