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

Definition at line 309 of file dim_thr.c.

References ALRM_thread, IO_thread, and MAIN_thread.

Referenced by dim_signal_cond().

310 {
311 #ifdef __linux__
312  pthread_t id = MAIN_thread;
313  int ret;
314  int pclass;
315  struct sched_param param;
316 
317  if(threadId == 1)
318  id = MAIN_thread;
319  else if(threadId == 2)
320  id = IO_thread;
321  else if(threadId == 3)
322  id = ALRM_thread;
323 
324  ret = pthread_getschedparam(id, &pclass, &param);
325  param.sched_priority = prio;
326  ret = pthread_setschedparam(id, pclass, &param);
327  if(!ret)
328  return 1;
329 #endif
330  return 0;
331 }
pthread_t IO_thread
Definition: dim_thr.c:18
pthread_t MAIN_thread
Definition: dim_thr.c:21
pthread_t ALRM_thread
Definition: dim_thr.c:19

+ Here is the caller graph for this function: