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

Function soupcall_clear

freebsd/kern/uipc_socket.c:4136–4159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4134}
4135
4136void
4137soupcall_clear(struct socket *so, int which)
4138{
4139 struct sockbuf *sb;
4140
4141 KASSERT(!SOLISTENING(so), ("%s: so %p listening", __func__, so));
4142
4143 switch (which) {
4144 case SO_RCV:
4145 sb = &so->so_rcv;
4146 break;
4147 case SO_SND:
4148 sb = &so->so_snd;
4149 break;
4150 default:
4151 panic("soupcall_clear: bad which");
4152 }
4153 SOCKBUF_LOCK_ASSERT(sb);
4154 KASSERT(sb->sb_upcall != NULL,
4155 ("%s: so %p no upcall to clear", __func__, so));
4156 sb->sb_upcall = NULL;
4157 sb->sb_upcallarg = NULL;
4158 sb->sb_flags &= ~SB_UPCALL;
4159}
4160
4161void
4162solisten_upcall_set(struct socket *so, so_upcall_t func, void *arg)

Callers 5

sowakeupFunction · 0.85
soisconnectedFunction · 0.85
ng_ksocket_shutdownFunction · 0.85

Calls 1

panicFunction · 0.70

Tested by

no test coverage detected