opnsense-src/sys/rpc
Alan Somers 60314995ef libc/libc/rpc: refactor some global variables
* Combine dg_fd_locks and dg_cv into one array.
* Similarly for vc_fd_locks and vc_cv
* Turn some macros into inline functions

This is a mostly cosmetic change to make refactoring these strutures in
a future commit easier.

Sponsored by:	Axcient
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D42597

(cherry picked from commit a5c2f4e939430f0048136c39fb9fa6093d401905)

lib/libc/rpc: switch the per-fd structs in clnt_{dg,vc}.c to RB Trees

This saves oodles of memory, especially when "ulimit -n" is large.  It
also prevents a buffer overflow if getrlimit should fail.

Also replace per-fd condvars with mutexes to simplify the code.

PR:		274968
Sponsored by:	Axcient
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D42597

(cherry picked from commit 24938f9311c9c9acc1ce747f4e6a088c2dbc967d)
2023-11-29 20:16:16 -07:00
..
rpcsec_gss sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpcsec_tls sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
auth.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
auth_none.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
auth_unix.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
authunix_prot.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
clnt.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
clnt_bck.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
clnt_dg.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
clnt_rc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
clnt_stat.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
clnt_vc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
getnetconfig.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
krpc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netconfig.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
nettype.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
pmap_prot.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
replay.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
replay.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
rpc.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
rpc_callmsg.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpc_com.h libc/libc/rpc: refactor some global variables 2023-11-29 20:16:16 -07:00
rpc_generic.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpc_msg.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
rpc_prot.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpcb_clnt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpcb_clnt.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
rpcb_prot.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
rpcb_prot.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
rpcm_subs.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
rpcsec_gss.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
rpcsec_tls.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
svc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
svc_auth.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc_auth.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
svc_auth_unix.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc_dg.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc_generic.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
svc_vc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
types.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
xdr.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00