2 * Copyright (C) 1994-1998, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.6 1998-02-11 11:53:35 adam
8 * Changed code so that it compiles as C++.
10 * Revision 1.5 1998/02/10 11:03:56 adam
11 * Added support for extended handlers in backend server interface.
13 * Revision 1.4 1997/10/27 13:55:03 adam
14 * Fixed memory leak: member response wasn't freed when queue
17 * Revision 1.3 1997/09/01 08:53:00 adam
18 * New windows NT/95 port using MSV5.0. The test server 'ztest' was
19 * moved a separate directory. MSV5.0 project server.dsp created.
20 * As an option, the server can now operate as an NT service.
22 * Revision 1.2 1995/11/01 13:54:57 quinn
25 * Revision 1.1 1995/05/15 12:12:22 quinn
32 * Simple queue management.
34 * We also use the request-freelist to store encoding buffers, rather than
35 * freeing and xmalloc'ing them on each cycle.
43 void request_enq(request_q *q, request *r)
53 request *request_head(request_q *q)
58 request *request_deq(request_q *q)
64 q->head = q->head->next;
71 void request_initq(request_q *q)
73 q->head = q->tail = q->list = 0;
77 void request_delq(request_q *q)
79 request *r1, *r = q->list;
89 request *request_get(request_q *q)
97 if (!(r = (request *)xmalloc(sizeof(*r))))
100 r->size_response = 0;
109 r->state = REQUEST_IDLE;
114 void request_release(request *r)