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

Function sblock

freebsd/kern/uipc_sockbuf.c:454–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454int
455sblock(struct sockbuf *sb, int flags)
456{
457
458 KASSERT((flags & SBL_VALID) == flags,
459 ("sblock: flags invalid (0x%x)", flags));
460
461 if (flags & SBL_WAIT) {
462 if ((sb->sb_flags & SB_NOINTR) ||
463 (flags & SBL_NOINTR)) {
464 sx_xlock(&sb->sb_sx);
465 return (0);
466 }
467 return (sx_xlock_sig(&sb->sb_sx));
468 } else {
469 if (sx_try_xlock(&sb->sb_sx) == 0)
470 return (EWOULDBLOCK);
471 return (0);
472 }
473}
474
475void
476sbunlock(struct sockbuf *sb)

Callers 9

sctp_sorecvmsgFunction · 0.85
vn_sendfileFunction · 0.85
ktls_enable_txFunction · 0.85
ktls_set_tx_modeFunction · 0.85
sosend_genericFunction · 0.85
uipc_socket.cFile · 0.85
soreceive_streamFunction · 0.85
sorflushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected