FACT++  1.0
int dim_set_priority ( int  threadId,
int  prio 
)

Definition at line 301 of file dim_thr_old.c.

References ALRM_thread, IO_thread, and MAIN_thread.

Referenced by dim_signal_cond().

302 {
303 #ifdef __linux__
304  pthread_t id = MAIN_thread;
305  int ret;
306  int pclass;
307  struct sched_param param;
308 
309  if(threadId == 1)
310  id = MAIN_thread;
311  else if(threadId == 2)
312  id = IO_thread;
313  else if(threadId == 3)
314  id = ALRM_thread;
315 
316  ret = pthread_getschedparam(id, &pclass, &param);
317  param.sched_priority = prio;
318  ret = pthread_setschedparam(id, pclass, &param);
319  if(!ret)
320  return 1;
321 #endif
322  return 0;
323 }
pthread_t MAIN_thread
Definition: dim_thr_old.c:21
pthread_t IO_thread
Definition: dim_thr_old.c:18
pthread_t ALRM_thread
Definition: dim_thr_old.c:19

+ Here is the caller graph for this function: