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

Function tcp_input_lock

freebsd/netinet/tcp_hpts.c:539–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537}
538
539struct tcp_hpts_entry *
540tcp_input_lock(struct inpcb *inp)
541{
542 struct tcp_hpts_entry *hpts;
543 int32_t hpts_num;
544
545again:
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
562static void
563tcp_remove_hpts_ref(struct inpcb *inp, struct tcp_hpts_entry *hpts, int line)

Callers 6

in_pcbrele_rlockedFunction · 0.85
in_pcbrele_wlockedFunction · 0.85
__tcp_hpts_removeFunction · 0.85
__tcp_queue_to_inputFunction · 0.85
__tcp_set_inp_to_dropFunction · 0.85
__tcp_set_hptsFunction · 0.85

Calls 3

panicFunction · 0.50
mtx_lockFunction · 0.50
mtx_unlockFunction · 0.50

Tested by

no test coverage detected