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

Function chgsbsize

freebsd/kern/kern_resource.c:1522–1536  ·  view source on GitHub ↗

* Change the total socket buffer size a user has used. */

Source from the content-addressed store, hash-verified

1520 * Change the total socket buffer size a user has used.
1521 */
1522int
1523chgsbsize(struct uidinfo *uip, u_int *hiwat, u_int to, rlim_t max)
1524{
1525 int diff, rv;
1526
1527 diff = to - *hiwat;
1528 if (diff > 0 && max == 0) {
1529 rv = 0;
1530 } else {
1531 rv = chglimit(uip, &uip->ui_sbsize, diff, max, "sbsize");
1532 if (rv != 0)
1533 *hiwat = to;
1534 }
1535 return (rv);
1536}
1537
1538/*
1539 * Change the count associated with number of pseudo-terminals

Callers 3

sbreserve_lockedFunction · 0.70
sbrelease_internalFunction · 0.70
sodeallocFunction · 0.70

Calls 1

chglimitFunction · 0.70

Tested by

no test coverage detected