void simplethread_bang(t_simplethread *x) { simplethread_stop(x); // kill thread if, any // create new thread + begin execution if (x->x_systhread == NULL) { post("starting a new thread"); systhread_create((method) simplethread_threadproc, x, 0, 0, 0, &x->x_systhread); } }
long jit_freenect_restart_thread(t_jit_freenect_grab *x) { long rval = MAX_ERR_NONE; postNesa("restarting thread.\n");//TODO: remove jit_freenect_thread_stop(x); // kill thread if, any // create new thread + begin execution if (x_systhread == NULL) { postNesa("starting a new thread"); x_systhread_cancel = FALSE; rval = systhread_create((method) jit_freenect_capture_threadproc, NULL, 0, 0, 0, &x_systhread); } return rval; }