| 514 | } |
| 515 | |
| 516 | struct tcp_hpts_entry * |
| 517 | tcp_hpts_lock(struct inpcb *inp) |
| 518 | { |
| 519 | struct tcp_hpts_entry *hpts; |
| 520 | int32_t hpts_num; |
| 521 | |
| 522 | again: |
| 523 | hpts_num = inp->inp_hpts_cpu; |
| 524 | hpts = tcp_pace.rp_ent[hpts_num]; |
| 525 | #ifdef INVARIANTS |
| 526 | if (mtx_owned(&hpts->p_mtx)) { |
| 527 | panic("Hpts:%p owns mtx prior-to lock line:%d", |
| 528 | hpts, __LINE__); |
| 529 | } |
| 530 | #endif |
| 531 | mtx_lock(&hpts->p_mtx); |
| 532 | if (hpts_num != inp->inp_hpts_cpu) { |
| 533 | mtx_unlock(&hpts->p_mtx); |
| 534 | goto again; |
| 535 | } |
| 536 | return (hpts); |
| 537 | } |
| 538 | |
| 539 | struct tcp_hpts_entry * |
| 540 | tcp_input_lock(struct inpcb *inp) |
no test coverage detected