X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/blobdiff_plain/939744d7e3e4b77d9ff324b2e3ee8c753eac6b1a..refs/heads/LOCKING:/include/gdb.h diff --git a/include/gdb.h b/include/gdb.h index de55d2b9..72ce9428 100644 --- a/include/gdb.h +++ b/include/gdb.h @@ -1,5 +1,4 @@ /* - * $Source$ * $Header$ */ @@ -43,11 +42,16 @@ #ifndef howmany #define howmany(x, y) (((x)+((y)-1))/(y)) #endif +#ifndef FD_SETSIZE +#define FD_SETSIZE 256 +#endif #ifndef FD_SET #define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) #define FD_ZERO(p) bzero(p, sizeof(*(p))) +typedef long fd_mask; +typedef struct fd_set {fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];} fd_set; #endif @@ -78,6 +82,8 @@ #define GDB_ROUNDUP(n,b) ((((n)+(b)-1)/(b))*(b)) +extern int gdb_Options; /* Control optional features */ +#define GDB_OPT_KEEPALIVE 1 extern int gdb_Debug; /* debugging flags are */ /* stored here */ extern FILE *gdb_log; /* file descriptor for */ @@ -399,7 +405,7 @@ typedef struct rel_dat *RELATION; /* handle on a relation */ #define GDB_BIND_RETRY_INTERVAL 10 /* Number of seconds to wait */ /* between attempts to bind */ /* the listening socket */ -#define GDB_MAX_CONNECTIONS 25 /* maximum number of */ +#define GDB_MAX_CONNECTIONS 40 /* maximum number of */ /* connections that */ /* any one process can */ /* control simultaneously */ @@ -581,7 +587,7 @@ extern struct con_data gdb_cons[GDB_MAX_CONNECTIONS]; extern fd_set gdb_crfds, gdb_cwfds, gdb_cefds; /* connection related file */ /* descriptor maps to be */ /* used in select */ -fd_set last_crfds, last_cwfds, last_cefds; /* these file desc. bit */ +extern fd_set last_crfds, last_cwfds, last_cefds;/* these file desc. bit */ /* masks are set up */ /* for each select call */ /* to include the user */ @@ -1405,7 +1411,7 @@ extern int (*gdb_fmv)(); #define start_db_query gdb_sdbq #else #define op_select_any op_select -#endif DUMB_7_CHAR_LOADER +#endif /* DUMB_7_CHAR_LOADER */ extern char *string_alloc(); extern int string_free();