ModSelectWin32.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9/* DEBUG: section 05 Socket Functions */
10
11#include "squid.h"
12
13#if USE_SELECT_WIN32
14#include "anyp/PortCfg.h"
15#include "comm/Connection.h"
16#include "comm/Loops.h"
17#include "fde.h"
18#include "ICP.h"
19#include "mgr/Registration.h"
20#include "StatCounters.h"
21#include "StatHist.h"
22#include "Store.h"
23
24#include <cerrno>
25
26static int MAX_POLL_TIME = 1000; /* see also Comm::QuickPollRequired() */
27
28#ifndef howmany
29#define howmany(x, y) (((x)+((y)-1))/(y))
30#endif
31#ifndef NBBY
32#define NBBY 8
33#endif
34#define FD_MASK_BYTES sizeof(fd_mask)
35#define FD_MASK_BITS (FD_MASK_BYTES*NBBY)
36
37/* STATIC */
38static int examine_select(fd_set *, fd_set *);
39static int fdIsTcpListener(int fd);
40static int fdIsUdpListener(int fd);
41static int fdIsDns(int fd);
43static int comm_check_incoming_select_handlers(int nfds, int *fds);
44static void comm_select_dns_incoming(void);
45static void commUpdateReadBits(int fd, PF * handler);
46static void commUpdateWriteBits(int fd, PF * handler);
47
48static struct timeval zero_tv;
49static fd_set global_readfds;
50static fd_set global_writefds;
51static int nreadfds;
52static int nwritefds;
53
54/*
55 * Automatic tuning for incoming requests:
56 *
57 * INCOMING sockets are the ICP and HTTP ports. We need to check these
58 * fairly regularly, but how often? When the load increases, we
59 * want to check the incoming sockets more often. If we have a lot
60 * of incoming ICP, then we need to check these sockets more than
61 * if we just have HTTP.
62 *
63 * The variables 'incoming_udp_interval' and 'incoming_tcp_interval'
64 * determine how many normal I/O events to process before checking
65 * incoming sockets again. Note we store the incoming_interval
66 * multiplied by a factor of (2^INCOMING_FACTOR) to have some
67 * pseudo-floating point precision.
68 *
69 * The variable 'udp_io_events' and 'tcp_io_events' counts how many normal
70 * I/O events have been processed since the last check on the incoming
71 * sockets. When io_events > incoming_interval, its time to check incoming
72 * sockets.
73 *
74 * Every time we check incoming sockets, we count how many new messages
75 * or connections were processed. This is used to adjust the
76 * incoming_interval for the next iteration. The new incoming_interval
77 * is calculated as the current incoming_interval plus what we would
78 * like to see as an average number of events minus the number of
79 * events just processed.
80 *
81 * incoming_interval = incoming_interval + target_average - number_of_events_processed
82 *
83 * There are separate incoming_interval counters for DNS, UDP and TCP events
84 *
85 * You can see the current values of the incoming_interval's, as well as
86 * a histogram of 'incoming_events' by asking the cache manager
87 * for 'comm_incoming', e.g.:
88 *
89 * % ./client mgr:comm_incoming
90 *
91 * Caveats:
92 *
93 * - We have MAX_INCOMING_INTEGER as a magic upper limit on
94 * incoming_interval for both types of sockets. At the
95 * largest value the cache will effectively be idling.
96 *
97 * - The higher the INCOMING_FACTOR, the slower the algorithm will
98 * respond to load spikes/increases/decreases in demand. A value
99 * between 3 and 8 is recommended.
100 */
101
102#define MAX_INCOMING_INTEGER 256
103#define INCOMING_FACTOR 5
104#define MAX_INCOMING_INTERVAL (MAX_INCOMING_INTEGER << INCOMING_FACTOR)
105static int udp_io_events = 0;
106static int dns_io_events = 0;
107static int tcp_io_events = 0;
111#define commCheckUdpIncoming (++udp_io_events > (incoming_udp_interval>> INCOMING_FACTOR))
112#define commCheckDnsIncoming (++dns_io_events > (incoming_dns_interval>> INCOMING_FACTOR))
113#define commCheckTcpIncoming (++tcp_io_events > (incoming_tcp_interval>> INCOMING_FACTOR))
114
115void
116Comm::SetSelect(int fd, unsigned int type, PF * handler, void *client_data, time_t timeout)
117{
118 fde *F = &fd_table[fd];
119 assert(fd >= 0);
120 assert(F->flags.open || (!handler && !client_data && !timeout));
121 debugs(5, 5, "FD " << fd << ", type=" << type <<
122 ", handler=" << handler << ", client_data=" << client_data <<
123 ", timeout=" << timeout);
124
125 if (type & COMM_SELECT_READ) {
126 F->read_handler = handler;
127 F->read_data = client_data;
129 }
130
131 if (type & COMM_SELECT_WRITE) {
132 F->write_handler = handler;
133 F->write_data = client_data;
135 }
136
137 if (timeout)
138 F->timeout = squid_curtime + timeout;
139}
140
141static int
143{
144 if (icpIncomingConn != NULL && fd == icpIncomingConn->fd)
145 return 1;
146
147 if (icpOutgoingConn != NULL && fd == icpOutgoingConn->fd)
148 return 1;
149
150 return 0;
151}
152
153static int
154fdIsDns(int fd)
155{
156 if (fd == DnsSocketA)
157 return 1;
158
159 if (fd == DnsSocketB)
160 return 1;
161
162 return 0;
163}
164
165static int
167{
168 for (AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) {
169 if (s->listenConn != NULL && s->listenConn->fd == fd)
170 return 1;
171 }
172
173 return 0;
174}
175
176static int
178{
179 int i;
180 int fd;
181 int maxfd = 0;
182 PF *hdl = NULL;
183 fd_set read_mask;
184 fd_set write_mask;
185 FD_ZERO(&read_mask);
186 FD_ZERO(&write_mask);
188
189 for (i = 0; i < nfds; ++i) {
190 fd = fds[i];
191
192 if (fd_table[fd].read_handler) {
193 FD_SET(fd, &read_mask);
194
195 if (fd > maxfd)
196 maxfd = fd;
197 }
198
199 if (fd_table[fd].write_handler) {
200 FD_SET(fd, &write_mask);
201
202 if (fd > maxfd)
203 maxfd = fd;
204 }
205 }
206
207 if (maxfd++ == 0)
208 return -1;
209
211
213
214 if (select(maxfd, &read_mask, &write_mask, NULL, &zero_tv) < 1)
216
217 for (i = 0; i < nfds; ++i) {
218 fd = fds[i];
219
220 if (FD_ISSET(fd, &read_mask)) {
221 if ((hdl = fd_table[fd].read_handler) != NULL) {
222 fd_table[fd].read_handler = NULL;
224 hdl(fd, fd_table[fd].read_data);
225 } else {
226 debugs(5, DBG_IMPORTANT, "comm_select_incoming: FD " << fd << " NULL read handler");
227 }
228 }
229
230 if (FD_ISSET(fd, &write_mask)) {
231 if ((hdl = fd_table[fd].write_handler) != NULL) {
232 fd_table[fd].write_handler = NULL;
234 hdl(fd, fd_table[fd].write_data);
235 } else {
236 debugs(5, DBG_IMPORTANT, "comm_select_incoming: FD " << fd << " NULL write handler");
237 }
238 }
239 }
240
242}
243
244static void
246{
247 int nfds = 0;
248 int fds[2];
249 int nevents;
250 udp_io_events = 0;
251
253 fds[nfds] = icpIncomingConn->fd;
254 ++nfds;
255 }
256
258 fds[nfds] = icpOutgoingConn->fd;
259 ++nfds;
260 }
261
262 if (nfds == 0)
263 return;
264
265 nevents = comm_check_incoming_select_handlers(nfds, fds);
266
268
269 if (incoming_udp_interval < 0)
271
274
275 if (nevents > INCOMING_UDP_MAX)
276 nevents = INCOMING_UDP_MAX;
277
279}
280
281static void
283{
284 int nfds = 0;
285 int fds[MAXTCPLISTENPORTS];
286 int nevents;
287 tcp_io_events = 0;
288
289 // XXX: only poll sockets that won't be deferred. But how do we identify them?
290
291 for (AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) {
292 if (Comm::IsConnOpen(s->listenConn)) {
293 fds[nfds] = s->listenConn->fd;
294 ++nfds;
295 }
296 }
297
298 nevents = comm_check_incoming_select_handlers(nfds, fds);
300
301 if (incoming_tcp_interval < 0)
303
306
307 if (nevents > INCOMING_TCP_MAX)
308 nevents = INCOMING_TCP_MAX;
309
311}
312
313/* Select on all sockets; call handlers for those that are ready. */
315Comm::DoSelect(int msec)
316{
317 fd_set readfds;
318 fd_set pendingfds;
319 fd_set writefds;
320
321 PF *hdl = NULL;
322 int fd;
323 int maxfd;
324 int num;
325 int pending;
326 int calldns = 0, calludp = 0, calltcp = 0;
327 int j;
328 struct timeval poll_time;
329 double timeout = current_dtime + (msec / 1000.0);
330 fde *F;
331
332 int no_bits;
333 fd_set errfds;
334 FD_ZERO(&errfds);
335
336 do {
337 double start;
339 start = current_dtime;
340
343
346
349
350 calldns = calludp = calltcp = 0;
351
352 maxfd = Biggest_FD + 1;
353
354 memcpy(&readfds, &global_readfds, sizeof(global_readfds));
355
356 memcpy(&writefds, &global_writefds, sizeof(global_writefds));
357
358 memcpy(&errfds, &global_writefds, sizeof(global_writefds));
359
360 /* remove stalled FDs, and deal with pending descriptors */
361 pending = 0;
362
363 FD_ZERO(&pendingfds);
364
365 for (j = 0; j < (int) readfds.fd_count; ++j) {
366 register int readfds_handle = readfds.fd_array[j];
367 no_bits = 1;
368
369 for ( fd = Biggest_FD; fd; --fd ) {
370 if ( fd_table[fd].win32.handle == readfds_handle ) {
371 if (fd_table[fd].flags.open) {
372 no_bits = 0;
373 break;
374 }
375 }
376 }
377
378 if (no_bits)
379 continue;
380
381 if (FD_ISSET(fd, &readfds) && fd_table[fd].flags.read_pending) {
382 FD_SET(fd, &pendingfds);
383 ++pending;
384 }
385 }
386
387 if (nreadfds + nwritefds == 0) {
389 return Comm::SHUTDOWN;
390 }
391
392 if (msec > MAX_POLL_TIME)
393 msec = MAX_POLL_TIME;
394
395 if (pending)
396 msec = 0;
397
398 for (;;) {
399 poll_time.tv_sec = msec / 1000;
400 poll_time.tv_usec = (msec % 1000) * 1000;
402 num = select(maxfd, &readfds, &writefds, &errfds, &poll_time);
403 int xerrno = errno;
405
406 if (num >= 0 || pending > 0)
407 break;
408
409 if (ignoreErrno(xerrno))
410 break;
411
412 debugs(5, DBG_CRITICAL, MYNAME << "WARNING: select failure: " << xstrerr(xerrno));
413
414 examine_select(&readfds, &writefds);
415
416 return Comm::COMM_ERROR;
417
418 /* NOTREACHED */
419 }
420
421 if (num < 0 && !pending)
422 continue;
423
425
426 debugs(5, num ? 5 : 8, "comm_select: " << num << "+" << pending << " FDs ready");
427
429
430 if (num == 0 && pending == 0)
431 continue;
432
433 /* Scan return fd masks for ready descriptors */
434 assert(readfds.fd_count <= (unsigned int) Biggest_FD);
435 assert(pendingfds.fd_count <= (unsigned int) Biggest_FD);
436
437 for (j = 0; j < (int) readfds.fd_count; ++j) {
438 register int readfds_handle = readfds.fd_array[j];
439 register int pendingfds_handle = pendingfds.fd_array[j];
440 register int osfhandle;
441 no_bits = 1;
442
443 for ( fd = Biggest_FD; fd; --fd ) {
444 osfhandle = fd_table[fd].win32.handle;
445
446 if (( osfhandle == readfds_handle ) ||
447 ( osfhandle == pendingfds_handle )) {
448 if (fd_table[fd].flags.open) {
449 no_bits = 0;
450 break;
451 }
452 }
453 }
454
455 if (no_bits)
456 continue;
457
458 if (fdIsUdpListener(fd)) {
459 calludp = 1;
460 continue;
461 }
462
463 if (fdIsDns(fd)) {
464 calldns = 1;
465 continue;
466 }
467
468 if (fdIsTcpListener(fd)) {
469 calltcp = 1;
470 continue;
471 }
472
473 F = &fd_table[fd];
474 debugs(5, 6, "comm_select: FD " << fd << " ready for reading");
475
476 if ((hdl = F->read_handler)) {
477 F->read_handler = NULL;
479 hdl(fd, F->read_data);
481
484
487
490 }
491 }
492
493 assert(errfds.fd_count <= (unsigned int) Biggest_FD);
494
495 for (j = 0; j < (int) errfds.fd_count; ++j) {
496 register int errfds_handle = errfds.fd_array[j];
497
498 for ( fd = Biggest_FD; fd; --fd ) {
499 if ( fd_table[fd].win32.handle == errfds_handle )
500 break;
501 }
502
503 if (fd_table[fd].flags.open) {
504 F = &fd_table[fd];
505
506 if ((hdl = F->write_handler)) {
507 F->write_handler = NULL;
509 hdl(fd, F->write_data);
511 }
512 }
513 }
514
515 assert(writefds.fd_count <= (unsigned int) Biggest_FD);
516
517 for (j = 0; j < (int) writefds.fd_count; ++j) {
518 register int writefds_handle = writefds.fd_array[j];
519 no_bits = 1;
520
521 for ( fd = Biggest_FD; fd; --fd ) {
522 if ( fd_table[fd].win32.handle == writefds_handle ) {
523 if (fd_table[fd].flags.open) {
524 no_bits = 0;
525 break;
526 }
527 }
528 }
529
530 if (no_bits)
531 continue;
532
533 if (fdIsUdpListener(fd)) {
534 calludp = 1;
535 continue;
536 }
537
538 if (fdIsDns(fd)) {
539 calldns = 1;
540 continue;
541 }
542
543 if (fdIsTcpListener(fd)) {
544 calltcp = 1;
545 continue;
546 }
547
548 F = &fd_table[fd];
549 debugs(5, 6, "comm_select: FD " << fd << " ready for writing");
550
551 if ((hdl = F->write_handler)) {
552 F->write_handler = NULL;
554 hdl(fd, F->write_data);
556
559
562
565 }
566 }
567
568 if (calludp)
570
571 if (calldns)
573
574 if (calltcp)
576
578
580
581 return Comm::OK;
582 } while (timeout > current_dtime);
583 debugs(5, 8, "comm_select: time out: " << squid_curtime);
584
585 return Comm::TIMEOUT;
586}
587
588static void
590{
591 int nfds = 0;
592 int fds[3];
593 int nevents;
594 dns_io_events = 0;
595
596 if (DnsSocketA < 0 && DnsSocketB < 0)
597 return;
598
599 if (DnsSocketA >= 0) {
600 fds[nfds] = DnsSocketA;
601 ++nfds;
602 }
603
604 if (DnsSocketB >= 0) {
605 fds[nfds] = DnsSocketB;
606 ++nfds;
607 }
608
609 nevents = comm_check_incoming_select_handlers(nfds, fds);
610
611 if (nevents < 0)
612 return;
613
615
618
621
622 if (nevents > INCOMING_DNS_MAX)
623 nevents = INCOMING_DNS_MAX;
624
626}
627
628void
630{
631 zero_tv.tv_sec = 0;
632 zero_tv.tv_usec = 0;
633 FD_ZERO(&global_readfds);
634 FD_ZERO(&global_writefds);
635 nreadfds = nwritefds = 0;
636
637 Mgr::RegisterAction("comm_select_incoming",
638 "comm_incoming() stats",
639 commIncomingStats, 0, 1);
640}
641
642/*
643 * examine_select - debug routine.
644 *
645 * I spend the day chasing this core dump that occurs when both the client
646 * and the server side of a cache fetch simultaneoulsy abort the
647 * connection. While I haven't really studied the code to figure out how
648 * it happens, the snippet below may prevent the cache from exitting:
649 *
650 * Call this from where the select loop fails.
651 */
652static int
653examine_select(fd_set * readfds, fd_set * writefds)
654{
655 int fd = 0;
656 fd_set read_x;
657 fd_set write_x;
658
659 struct timeval tv;
661 fde *F = NULL;
662
663 struct stat sb;
664 debugs(5, DBG_CRITICAL, "examine_select: Examining open file descriptors...");
665
666 for (fd = 0; fd < Squid_MaxFD; ++fd) {
667 FD_ZERO(&read_x);
668 FD_ZERO(&write_x);
669 tv.tv_sec = tv.tv_usec = 0;
670
671 if (FD_ISSET(fd, readfds))
672 FD_SET(fd, &read_x);
673 else if (FD_ISSET(fd, writefds))
674 FD_SET(fd, &write_x);
675 else
676 continue;
677
679 errno = 0;
680
681 if (!fstat(fd, &sb)) {
682 debugs(5, 5, "FD " << fd << " is valid.");
683 continue;
684 }
685 int xerrno = errno;
686
687 F = &fd_table[fd];
688 debugs(5, DBG_CRITICAL, "fstat(FD " << fd << "): " << xstrerr(xerrno));
689 debugs(5, DBG_CRITICAL, "WARNING: FD " << fd << " has handlers, but it's invalid.");
690 debugs(5, DBG_CRITICAL, "FD " << fd << " is a " << fdTypeStr[F->type] << " called '" << F->desc << "'");
691 debugs(5, DBG_CRITICAL, "tmout:" << F->timeoutHandler << " read:" << F->read_handler << " write:" << F->write_handler);
692
693 for (ch = F->closeHandler; ch != NULL; ch = ch->Next())
694 debugs(5, DBG_CRITICAL, " close handler: " << ch);
695
696 if (F->closeHandler != NULL) {
698 } else if (F->timeoutHandler != NULL) {
699 debugs(5, DBG_CRITICAL, "examine_select: Calling Timeout Handler");
700 ScheduleCallHere(F->timeoutHandler);
701 }
702
703 F->closeHandler = NULL;
704 F->timeoutHandler = NULL;
705 F->read_handler = NULL;
706 F->write_handler = NULL;
707 FD_CLR(fd, readfds);
708 FD_CLR(fd, writefds);
709 }
710
711 return 0;
712}
713
714static void
716{
717 storeAppendPrintf(sentry, "Current incoming_udp_interval: %d\n",
719 storeAppendPrintf(sentry, "Current incoming_dns_interval: %d\n",
721 storeAppendPrintf(sentry, "Current incoming_tcp_interval: %d\n",
723 storeAppendPrintf(sentry, "\n");
724 storeAppendPrintf(sentry, "Histogram of events per incoming socket type\n");
725 storeAppendPrintf(sentry, "ICP Messages handled per comm_select_udp_incoming() call:\n");
727 storeAppendPrintf(sentry, "DNS Messages handled per comm_select_dns_incoming() call:\n");
729 storeAppendPrintf(sentry, "HTTP Messages handled per comm_select_tcp_incoming() call:\n");
731}
732
733void
735{
736 if (handler && !FD_ISSET(fd, &global_readfds)) {
737 FD_SET(fd, &global_readfds);
738 ++nreadfds;
739 } else if (!handler && FD_ISSET(fd, &global_readfds)) {
740 FD_CLR(fd, &global_readfds);
741 --nreadfds;
742 }
743}
744
745void
747{
748 if (handler && !FD_ISSET(fd, &global_writefds)) {
749 FD_SET(fd, &global_writefds);
750 ++nwritefds;
751 } else if (!handler && FD_ISSET(fd, &global_writefds)) {
752 FD_CLR(fd, &global_writefds);
753 --nwritefds;
754 }
755}
756
757/* Called by async-io or diskd to speed up the polling */
758void
760{
761 MAX_POLL_TIME = 10;
762}
763
764#endif /* USE_SELECT_WIN32 */
765
#define ScheduleCallHere(call)
Definition: AsyncCall.h:165
#define INCOMING_TCP_MAX
Definition: Loops.h:69
#define INCOMING_DNS_MAX
Definition: Loops.h:59
#define INCOMING_UDP_MAX
Definition: Loops.h:50
static fd_set global_readfds
static int fdIsTcpListener(int fd)
static int incoming_udp_interval
#define commCheckTcpIncoming
static int incoming_tcp_interval
static int fdIsDns(int fd)
static void commUpdateReadBits(int fd, PF *handler)
static void comm_select_udp_incoming(void)
static int incoming_dns_interval
static int dns_io_events
static int tcp_io_events
static int nreadfds
static int nwritefds
static int MAX_POLL_TIME
#define commCheckDnsIncoming
#define commCheckUdpIncoming
static void comm_select_tcp_incoming(void)
static struct timeval zero_tv
static int examine_select(fd_set *, fd_set *)
static int fdIsUdpListener(int fd)
static int comm_check_incoming_select_handlers(int nfds, int *fds)
#define INCOMING_FACTOR
static OBJH commIncomingStats
static int udp_io_events
#define MAX_INCOMING_INTERVAL
static void commUpdateWriteBits(int fd, PF *handler)
static fd_set global_writefds
static void comm_select_dns_incoming(void)
time_t squid_curtime
Definition: stub_libtime.cc:20
AnyP::PortCfgPointer HttpPortList
list of Squid http(s)_port configured
Definition: PortCfg.cc:22
#define MAXTCPLISTENPORTS
Definition: PortCfg.h:87
class SquidConfig Config
Definition: SquidConfig.cc:12
StatCounters statCounter
Definition: StatCounters.cc:12
StatHistBinDumper statHistIntDumper
Definition: StatHist.h:119
#define assert(EX)
Definition: assert.h:17
struct SquidConfig::@112 comm_incoming
struct SquidConfig::@112::@120 dns
struct SquidConfig::@112::@120 tcp
struct SquidConfig::@112::@120 udp
double select_time
Definition: StatCounters.h:120
StatHist select_fds_hist
Definition: StatCounters.h:127
StatHist comm_tcp_incoming
Definition: StatCounters.h:126
struct StatCounters::@131 syscalls
unsigned long int select_loops
Definition: StatCounters.h:118
StatHist comm_udp_incoming
Definition: StatCounters.h:124
StatHist comm_dns_incoming
Definition: StatCounters.h:125
void count(double val)
Definition: StatHist.cc:55
void dump(StoreEntry *sentry, StatHistBinDumper *bd) const
Definition: StatHist.cc:171
Definition: fde.h:52
void PF(int, void *)
Definition: forward.h:18
void commCallCloseHandlers(int fd)
Definition: comm.cc:759
int ignoreErrno(int ierrno)
Definition: comm.cc:1440
#define MYNAME
Definition: Stream.h:236
#define DBG_IMPORTANT
Definition: Stream.h:38
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:194
#define DBG_CRITICAL
Definition: Stream.h:37
#define COMM_SELECT_READ
Definition: defines.h:24
#define COMM_SELECT_WRITE
Definition: defines.h:25
const char * fdTypeStr[]
Definition: fd.cc:39
#define fd_table
Definition: fde.h:189
int DnsSocketB
int DnsSocketA
int shutting_down
int Squid_MaxFD
int Biggest_FD
int incoming_sockets_accepted
Comm::ConnectionPointer icpOutgoingConn
Definition: icp_v2.cc:101
Comm::ConnectionPointer icpIncomingConn
Definition: icp_v2.cc:99
static uint32 F(uint32 X, uint32 Y, uint32 Z)
Definition: md4.c:46
void OBJH(StoreEntry *)
Definition: forward.h:44
void QuickPollRequired(void)
Definition: ModDevPoll.cc:417
bool IsConnOpen(const Comm::ConnectionPointer &conn)
Definition: Connection.cc:27
Flag
Definition: Flag.h:15
@ SHUTDOWN
Definition: Flag.h:19
@ OK
Definition: Flag.h:16
@ TIMEOUT
Definition: Flag.h:18
@ COMM_ERROR
Definition: Flag.h:17
Comm::Flag DoSelect(int)
Do poll and trigger callback functions as appropriate.
Definition: ModDevPoll.cc:311
void SelectLoopInit(void)
Initialize the module on Squid startup.
Definition: ModDevPoll.cc:176
void SetSelect(int, unsigned int, PF *, void *, time_t)
Mark an FD to be watched for its IO status.
Definition: ModDevPoll.cc:223
void RegisterAction(char const *action, char const *desc, OBJH *handler, int pw_req_flag, int atomic)
Definition: Registration.cc:16
static void handler(int signo)
Definition: purge.cc:858
static struct stat sb
Definition: squidclient.cc:71
void storeAppendPrintf(StoreEntry *e, const char *fmt,...)
Definition: store.cc:829
int unsigned int
Definition: stub_fd.cc:19
double current_dtime
the current UNIX time in seconds (with microsecond precision)
Definition: stub_libtime.cc:19
time_t getCurrentTime() STUB_RETVAL(0) int tvSubUsec(struct timeval
#define NULL
Definition: types.h:160
const char * xstrerr(int error)
Definition: xstrerror.cc:83

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors