LOG_I(HW,"[SCHED][eNB] PRACH thread started on CPU %d TID %ld, IC %d, sched_policy = %s, priority = %d, CPU Affinity = %s\n",sched_getcpu(),gettid(),proc->instance_cnt_prach,
(policy==SCHED_FIFO)?"SCHED_FIFO":
(policy==SCHED_RR)?"SCHED_RR":
(policy==SCHED_OTHER)?"SCHED_OTHER":
"???",
sparam.sched_priority,cpu_affinity);
#endif // DEADLINE_SCHEDULER
mlockall(MCL_CURRENT|MCL_FUTURE);
while(!oai_exit){
while(!oai_exit){
if(oai_exit)break;
if(oai_exit)break;
if(pthread_mutex_lock(&proc->mutex_prach)!=0){
LOG_E(PHY,"[SCHED][eNB] error locking mutex for eNB PRACH\n");
exit_fun("error locking mutex");
break;
}
while(proc->instance_cnt_prach<0){
// most of the time the thread is waiting here
// proc->instance_cnt_prach is -1
pthread_cond_wait(&proc->cond_prach,&proc->mutex_prach);// this unlocks mutex_rxtx while waiting and then locks it again
* \brief provides a wrapper for the timing function for real-time opeartions depending on weather RTAI is used or not. It also implements an API for the SCHED_DEADLINE kernel scheduler.
* \brief provides a wrapper for the timing function for real-time opeartions. It also implements an API for the SCHED_DEADLINE kernel scheduler.