MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pri_to_rtp

Function pri_to_rtp

freebsd/kern/kern_resource.c:517–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517void
518pri_to_rtp(struct thread *td, struct rtprio *rtp)
519{
520
521 thread_lock(td);
522 switch (PRI_BASE(td->td_pri_class)) {
523 case PRI_REALTIME:
524 rtp->prio = td->td_base_user_pri - PRI_MIN_REALTIME;
525 break;
526 case PRI_TIMESHARE:
527 rtp->prio = td->td_base_user_pri - PRI_MIN_TIMESHARE;
528 break;
529 case PRI_IDLE:
530 rtp->prio = td->td_base_user_pri - PRI_MIN_IDLE;
531 break;
532 default:
533 break;
534 }
535 rtp->type = td->td_pri_class;
536 thread_unlock(td);
537}
538
539#if defined(COMPAT_43)
540#ifndef _SYS_SYSPROTO_H_

Callers 4

sys_rtprio_threadFunction · 0.85
sys_rtprioFunction · 0.85
getschedulerFunction · 0.85
ksched_getparamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected