… | |
… | |
324 | static void (*done_poll_cb) (void); |
324 | static void (*done_poll_cb) (void); |
325 | |
325 | |
326 | static unsigned int max_poll_time; /* reslock */ |
326 | static unsigned int max_poll_time; /* reslock */ |
327 | static unsigned int max_poll_reqs; /* reslock */ |
327 | static unsigned int max_poll_reqs; /* reslock */ |
328 | |
328 | |
329 | static volatile unsigned int nreqs; /* reqlock */ |
329 | static unsigned int nreqs; /* reqlock */ |
330 | static volatile unsigned int nready; /* reqlock */ |
330 | static unsigned int nready; /* reqlock */ |
331 | static volatile unsigned int npending; /* reqlock */ |
331 | static unsigned int npending; /* reqlock */ |
332 | static volatile unsigned int max_idle = 4; /* maximum number of threads that can idle indefinitely */ |
332 | static unsigned int max_idle = 4; /* maximum number of threads that can idle indefinitely */ |
333 | static volatile unsigned int idle_timeout = 10; /* number of seconds after which an idle threads exit */ |
333 | static unsigned int idle_timeout = 10; /* number of seconds after which an idle threads exit */ |
334 | |
334 | |
335 | static xmutex_t wrklock; |
335 | static xmutex_t wrklock; |
336 | static xmutex_t reslock; |
336 | static xmutex_t reslock; |
337 | static xmutex_t reqlock; |
337 | static xmutex_t reqlock; |
338 | static xcond_t reqwait; |
338 | static xcond_t reqwait; |