Coda Distributed File System
lib-src
rpc2
rpc2-src
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
9
This code is distributed "AS IS" without warranty of any kind under
10
the terms of the GNU Library General Public Licence Version 2, as
11
shown in the file LICENSE. The technical and financial contributors to
12
Coda 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
28
struct
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
39
extern
"C"
{
40
#endif
41
42
int
list_empty
(
struct
dllist_head
*
head
);
43
void
list_del
(
struct
dllist_head
*
entry
);
44
void
list_add
(
struct
dllist_head
*
entry
,
struct
dllist_head
*
head
);
45
void
list_head_init
(
struct
dllist_head
*ptr);
46
47
#ifdef __cplusplus
48
}
49
#endif
50
51
#endif
/* _DLLIST_H_ */
list_empty
int list_empty(struct dllist_head *head)
Definition:
dllist.c:50
list_head_init
void list_head_init(struct dllist_head *ptr)
Definition:
dllist.c:21
list_del
void list_del(struct dllist_head *entry)
Definition:
dllist.c:42
list_add
void list_add(struct dllist_head *entry, struct dllist_head *head)
Definition:
dllist.c:30
head
PROC * head
Definition:
util.c:73
dllist_head
Definition:
dllist.h:30
dllist_head::prev
struct dllist_head * prev
Definition:
dllist.h:31
dllist_head::next
struct dllist_head * next
Definition:
dllist.h:31
entry
Definition:
codamergedump.cc:54
Generated by
1.9.4