| 515 | } |
| 516 | |
| 517 | void |
| 518 | pri_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_ |
no outgoing calls
no test coverage detected