void appInit() { int status; gAppAlive = 1; // navigation if (!nav_thread) { //vp_os_thread_create( thread_navdata_loop, 0, &nav_thread); } // video stream if (!stream_thread) { vp_os_thread_create( thread_stream_loop, 0, &stream_thread); } // AT cmds loop if (!at_thread) { //vp_os_thread_create( thread_at_cmds_loop, 0, &at_thread); } #ifdef BUILD_OGLES // video rendering video_init(); #endif }
void academy_upload_init(void) { if(!academy_upload_started) { vp_os_mutex_init(&academy_upload.mutex); vp_os_cond_init(&academy_upload.cond, &academy_upload.mutex); academy_upload.connected = FALSE; vp_os_memset(&academy_upload.user, 0, sizeof(academy_user_t)); academy_upload_started = TRUE; vp_os_thread_create(thread_academy_upload, (THREAD_PARAMS)&academy_upload, &academy_upload_thread); } }
C_RESULT vp_api_start_thread_tab(thread_table_entry_t* tab,int32_t idx,THREAD_PARAMS parameters) { if(idx < 0) return C_FAIL; PRINT("Starting thread %s\n", tab[idx].name); if( parameters == THREAD_NO_PARAM ) parameters = tab[idx].parameters; vp_os_thread_create(tab[idx].routine, parameters, &tab[idx].handle, tab[idx].priority, tab[idx].name, (void*)tab[idx].stack, tab[idx].stackSize, &tab[idx].thread ); return C_OK; }