svc_fdset
fd_set svc_fdset; A global variable reflecting the RPC service side's read file descriptor bit mask; it is suitable as a template argument to the select(2) system call. This is only of interest if a service implementor does not call svc_run(), but rather does his own asynchronous event processing. This variable is read-only (do not pass its address to select(2)!), yet it may change after calls to svc_getreqset() or any creation routines. As well, note that if the process has descriptor limits which are extended beyond FD_SETSIZE, this variable will only be usable for the first FD_SETSIZE descriptors.
via freebsd.org
原來在 svc.h 裡面定義了一個 svc_fdset,可以直接 copy 它並丟進去做 poll/select。
這個 set 裡面記綠現在這個 program 建立了哪些 services。對它做 poll/select 就能知道哪些 service 已經準備可以取得 reqeust。
而且 svc_run() 就是透過 svc_fdset, select(), svc_getreqset() 實作的。