IO Manager routines & server process for VICE server.
*/
+/* This controls the size of an fd_set; it must be defined early before
+ * the system headers define that type and the macros that operate on it.
+ * Its value should be as large as the maximum file descriptor limit we
+ * are likely to run into on any platform. Right now, that is 65536
+ * which is the default hard fd limit on Solaris 9 */
+/* We don't do this on Windows because on that platform there is code
+ * which allocates fd_set's on the stack (IOMGR_Sleep on Win9x, and
+ * FDSetAnd on WinNT) */
+#ifndef _WIN32
+#define FD_SETSIZE 65536
+#endif
+
#include <afsconfig.h>
#include <afs/param.h>
/* fd_set pool managment.
* Use the pool instead of creating fd_set's on the stack. fd_set's can be
- * 2K in size, so making three could put 6K in the limited space of an LWP
+ * 8K in size, so making three could put 24K in the limited space of an LWP
* stack.
*/
struct IOMGR_fd_set {
/* RX: Globals for internal use, basically */
+/* This controls the size of an fd_set; it must be defined early before
+ * the system headers define that type and the macros that operate on it.
+ * Its value should be as large as the maximum file descriptor limit we
+ * are likely to run into on any platform. Right now, that is 65536
+ * which is the default hard fd limit on Solaris 9 */
+#define FD_SETSIZE 65536
+
#include <afsconfig.h>
#ifdef KERNEL
#include "afs/param.h"
/* rx_user.c contains routines specific to the user space UNIX implementation of rx */
+/* This controls the size of an fd_set; it must be defined early before
+ * the system headers define that type and the macros that operate on it.
+ * Its value should be as large as the maximum file descriptor limit we
+ * are likely to run into on any platform. Right now, that is 65536
+ * which is the default hard fd limit on Solaris 9 */
+#define FD_SETSIZE 65536
+
#include <afsconfig.h>
#include <afs/param.h>
#endif
static int newVLDB = 1;
+
#ifndef AFS_PTHREAD_ENV
#define USUAL_PRIORITY (LWP_MAX_PRIORITY - 2)
fsync.c
File server synchronization with external volume utilities.
*/
+
+/* This controls the size of an fd_set; it must be defined early before
+ * the system headers define that type and the macros that operate on it.
+ * Its value should be as large as the maximum file descriptor limit we
+ * are likely to run into on any platform. Right now, that is 65536
+ * which is the default hard fd limit on Solaris 9 */
+#define FD_SETSIZE 65536
+
#include <afsconfig.h>
#include <afs/param.h>
return sd;
}
+static fd_set FSYNC_readfds;
+
static void
FSYNC_sync()
{
InitHandler();
AcceptOn();
for (;;) {
- fd_set readfds;
int maxfd;
- GetHandler(&readfds, &maxfd);
+ GetHandler(&FSYNC_readfds, &maxfd);
/* Note: check for >= 1 below is essential since IOMGR_select
* doesn't have exactly same semantics as select.
*/
#ifdef AFS_PTHREAD_ENV
- if (select(maxfd + 1, &readfds, NULL, NULL, NULL) >= 1)
+ if (select(maxfd + 1, &FSYNC_readfds, NULL, NULL, NULL) >= 1)
#else /* AFS_PTHREAD_ENV */
- if (IOMGR_Select(maxfd + 1, &readfds, NULL, NULL, NULL) >= 1)
+ if (IOMGR_Select(maxfd + 1, &FSYNC_readfds, NULL, NULL, NULL) >= 1)
#endif /* AFS_PTHREAD_ENV */
- CallHandler(&readfds);
+ CallHandler(&FSYNC_readfds);
}
}