Coda Distributed File System
dllist.h
Go to the documentation of this file.
1/* BLURB lgpl
2
3 Coda File System
4 Release 5
5
6 Copyright (c) 1987-1999 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU Library General Public Licence Version 2, as
11shown in the file LICENSE. The technical and financial contributors to
12Coda are listed in the file CREDITS.
13
14 Additional copyrights
15 none currently
16
17#*/
18
19#ifndef _DLLIST_H_
20#define _DLLIST_H_
21
22/*
23 * doubly linked list implementation -- based on linux
24 * kernel code lists.
25 *
26 */
27
28struct dllist_head {
29 struct dllist_head *next, *prev;
30};
31#define dllist_chain dllist_head
32
33#define DLLIST_HEAD(x) struct dllist_head x = { &x, &x }
34
35#define list_entry(ptr, type, member) \
36 ((type *)((char *)(ptr) - (unsigned long)(&((type *)0)->member)))
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42int list_empty(struct dllist_head *head);
43void list_del(struct dllist_head *entry);
44void list_add(struct dllist_head *entry, struct dllist_head *head);
45void list_head_init(struct dllist_head *ptr);
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif /* _DLLIST_H_ */
int list_empty(struct dllist_head *head)
Definition: dllist.c:50
void list_head_init(struct dllist_head *ptr)
Definition: dllist.c:21
void list_del(struct dllist_head *entry)
Definition: dllist.c:42
void list_add(struct dllist_head *entry, struct dllist_head *head)
Definition: dllist.c:30
PROC * head
Definition: util.c:73
Definition: dllist.h:30
struct dllist_head * prev
Definition: dllist.h:31
struct dllist_head * next
Definition: dllist.h:31
Definition: codamergedump.cc:54