| 537 | } |
| 538 | |
| 539 | struct tcp_hpts_entry * |
| 540 | tcp_input_lock(struct inpcb *inp) |
| 541 | { |
| 542 | struct tcp_hpts_entry *hpts; |
| 543 | int32_t hpts_num; |
| 544 | |
| 545 | again: |
| 546 | hpts_num = inp->inp_input_cpu; |
| 547 | hpts = tcp_pace.rp_ent[hpts_num]; |
| 548 | #ifdef INVARIANTS |
| 549 | if (mtx_owned(&hpts->p_mtx)) { |
| 550 | panic("Hpts:%p owns mtx prior-to lock line:%d", |
| 551 | hpts, __LINE__); |
| 552 | } |
| 553 | #endif |
| 554 | mtx_lock(&hpts->p_mtx); |
| 555 | if (hpts_num != inp->inp_input_cpu) { |
| 556 | mtx_unlock(&hpts->p_mtx); |
| 557 | goto again; |
| 558 | } |
| 559 | return (hpts); |
| 560 | } |
| 561 | |
| 562 | static void |
| 563 | tcp_remove_hpts_ref(struct inpcb *inp, struct tcp_hpts_entry *hpts, int line) |
no test coverage detected