svc_run.c (a986ef5788bd3338d2a970eb96104824e4a0e3bb) | svc_run.c (235baf269e492159336326a12da1ca09fbba85db) |
---|---|
1/* $NetBSD: svc_run.c,v 1.17 2000/07/06 03:10:35 christos Exp $ */ 2 3/* 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5 * unrestricted use provided that this legend is included on all tape 6 * media and as a part of the software program in whole or part. Users 7 * may copy or modify Sun RPC without charge, but are not authorized 8 * to license or distribute it to anyone else except as part of a product or --- 38 unchanged lines hidden (view full) --- 47#include <rpc/rpc.h> 48#include <stdio.h> 49#include <string.h> 50#include <unistd.h> 51#include "un-namespace.h" 52 53#include <rpc/rpc.h> 54#include "rpc_com.h" | 1/* $NetBSD: svc_run.c,v 1.17 2000/07/06 03:10:35 christos Exp $ */ 2 3/* 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5 * unrestricted use provided that this legend is included on all tape 6 * media and as a part of the software program in whole or part. Users 7 * may copy or modify Sun RPC without charge, but are not authorized 8 * to license or distribute it to anyone else except as part of a product or --- 38 unchanged lines hidden (view full) --- 47#include <rpc/rpc.h> 48#include <stdio.h> 49#include <string.h> 50#include <unistd.h> 51#include "un-namespace.h" 52 53#include <rpc/rpc.h> 54#include "rpc_com.h" |
55#include "mt_misc.h" |
|
55 56void 57svc_run() 58{ 59 fd_set readfds, cleanfds; 60 struct timeval timeout; | 56 57void 58svc_run() 59{ 60 fd_set readfds, cleanfds; 61 struct timeval timeout; |
61 extern rwlock_t svc_fd_lock; | |
62 63 timeout.tv_sec = 30; 64 timeout.tv_usec = 0; 65 66 for (;;) { 67 rwlock_rdlock(&svc_fd_lock); 68 readfds = svc_fdset; 69 cleanfds = svc_fdset; --- 17 unchanged lines hidden (view full) --- 87 88/* 89 * This function causes svc_run() to exit by telling it that it has no 90 * more work to do. 91 */ 92void 93svc_exit() 94{ | 62 63 timeout.tv_sec = 30; 64 timeout.tv_usec = 0; 65 66 for (;;) { 67 rwlock_rdlock(&svc_fd_lock); 68 readfds = svc_fdset; 69 cleanfds = svc_fdset; --- 17 unchanged lines hidden (view full) --- 87 88/* 89 * This function causes svc_run() to exit by telling it that it has no 90 * more work to do. 91 */ 92void 93svc_exit() 94{ |
95 extern rwlock_t svc_fd_lock; 96 | |
97 rwlock_wrlock(&svc_fd_lock); 98 FD_ZERO(&svc_fdset); 99 rwlock_unlock(&svc_fd_lock); 100} | 95 rwlock_wrlock(&svc_fd_lock); 96 FD_ZERO(&svc_fdset); 97 rwlock_unlock(&svc_fd_lock); 98} |