/[hydra]/hydra/src/queue.h
ViewVC logotype

Annotation of /hydra/src/queue.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Sat Sep 28 16:32:37 2002 UTC (21 years, 6 months ago) by nmav
Branch: MAIN
CVS Tags: hydra_0_1_6_without_hic, hydra_0_0_8, hydra_0_0_9, hydra_0_0_3, hydra_0_0_6, hydra_0_0_7, hydra_0_0_4, hydra_0_0_5, hydra_0_1_3, hydra_0_1_2, hydra_0_1_1, hydra_0_1_0, hydra_0_1_7, hydra_0_1_6, hydra_0_1_4, hydra_0_1_8, hydra_0_0_10, HEAD
Branch point for: hydra_0_1_0_patches
Changes since 1.1: +23 -0 lines
File MIME type: text/plain
In sighup and sigterm, the HIC thread is terminated as well.

1 nmav 1.2 /*
2     * Hydra, an http server
3     * Copyright (C) 1995 Paul Phillips <paulp@go2net.com>
4     * Some changes Copyright (C) 1997 Jon Nelson <jnelson@boa.org>
5     *
6     * This was moved to macros by Nikos Mavroyanopoulos
7     *
8     * This program is free software; you can redistribute it and/or modify
9     * it under the terms of the GNU General Public License as published by
10     * the Free Software Foundation; either version 1, or (at your option)
11     * any later version.
12     *
13     * This program is distributed in the hope that it will be useful,
14     * but WITHOUT ANY WARRANTY; without even the implied warranty of
15     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16     * GNU General Public License for more details.
17     *
18     * You should have received a copy of the GNU General Public License
19     * along with this program; if not, write to the Free Software
20     * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21     *
22     */
23    
24 nmav 1.1 /* Templates for Queue functions
25     */
26    
27     #define DEQUEUE_FUNCTION( func_name, type) \
28     void func_name(type ** head, type * req) \
29     { \
30     if (*head == req) \
31     *head = req->next; \
32     if (req->prev) \
33     req->prev->next = req->next; \
34     if (req->next) \
35     req->next->prev = req->prev; \
36     req->next = NULL; \
37     req->prev = NULL; \
38     }
39    
40     #define ENQUEUE_FUNCTION( func_name, type) \
41     void func_name(type ** head, type * req) \
42     { \
43     if (*head) \
44     (*head)->prev = req; /* previous head's prev is us */ \
45     req->next = *head; /* our next is previous head */ \
46     req->prev = NULL; /* first in list */ \
47     *head = req; /* now we are head */ \
48     }
49    

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26