/* This function is executed by the first task. */ void task1(void *arg) { int i = 0; /* avoid compiler warning */ (void) arg; for(;;) { /* call function */ sharedResource(1); /* do something here and waste some time */ posTaskSleep(MS(100 + i*20)); if (++i == 5) i = 0; } }
std::shared_ptr< Resource_ABC > SDL2DRenderManager::CreateRenderResource() const { std::shared_ptr< Resource_ABC > sharedResource( new SDLRenderResource( *this ) ); return sharedResource; }