int luajack_acquire_real_time_scheduling(luajack_t *client, int priority) { int rc; cud_t *cud = get_cud(client); if(!cud) return 0; rc = jack_acquire_real_time_scheduling((jack_native_thread_t)pthread_self(), priority); if(rc!=0) return luajack_error("jack_acquire_real_time_scheduling() error"); return rc; }
static void* jack_thread_proxy (void* varg) { jack_thread_arg_t* arg = (jack_thread_arg_t*) varg; void* (*work)(void*); void* warg; jack_client_t* client = arg->client; if (arg->realtime) { ptr_jack_thread_touch_stack(); maybe_get_capabilities (client); jack_acquire_real_time_scheduling (pthread_self(), arg->priority); } warg = arg->arg; work = arg->work_function; free (arg); return work (warg); }