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

Function tcp_hpts_lock

freebsd/netinet/tcp_hpts.c:516–537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516struct tcp_hpts_entry *
517tcp_hpts_lock(struct inpcb *inp)
518{
519 struct tcp_hpts_entry *hpts;
520 int32_t hpts_num;
521
522again:
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
539struct tcp_hpts_entry *
540tcp_input_lock(struct inpcb *inp)

Callers 6

in_pcbrele_rlockedFunction · 0.85
in_pcbrele_wlockedFunction · 0.85
__tcp_hpts_removeFunction · 0.85
tcp_hpts_insert_diagFunction · 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