2 * Copyright (C) 1994, Index Data.
3 * See the file LICENSE for details.
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.4 1997-10-27 13:55:03 adam
8 * Fixed memory leak: member response wasn't freed when queue
11 * Revision 1.3 1997/09/01 08:53:00 adam
12 * New windows NT/95 port using MSV5.0. The test server 'ztest' was
13 * moved a separate directory. MSV5.0 project server.dsp created.
14 * As an option, the server can now operate as an NT service.
16 * Revision 1.2 1995/11/01 13:54:57 quinn
19 * Revision 1.1 1995/05/15 12:12:22 quinn
26 * Simple queue management.
28 * We also use the request-freelist to store encoding buffers, rather than
29 * freeing and xmalloc'ing them on each cycle.
37 void request_enq(request_q *q, request *r)
47 request *request_head(request_q *q)
52 request *request_deq(request_q *q)
58 q->head = q->head->next;
65 void request_initq(request_q *q)
67 q->head = q->tail = q->list = 0;
71 void request_delq(request_q *q)
73 request *r1, *r = q->list;
83 request *request_get(request_q *q)
91 if (!(r = xmalloc(sizeof(*r))))
101 r->state = REQUEST_IDLE;
106 void request_release(request *r)