1168404Spjd/*
2168404Spjd * CDDL HEADER START
3168404Spjd *
4168404Spjd * The contents of this file are subject to the terms of the
5185029Spjd * Common Development and Distribution License (the "License").
6185029Spjd * You may not use this file except in compliance with the License.
7168404Spjd *
8168404Spjd * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9168404Spjd * or http://www.opensolaris.org/os/licensing.
10168404Spjd * See the License for the specific language governing permissions
11168404Spjd * and limitations under the License.
12168404Spjd *
13168404Spjd * When distributing Covered Code, include this CDDL HEADER in each
14168404Spjd * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15168404Spjd * If applicable, add the following below this CDDL HEADER, with the
16168404Spjd * fields enclosed by brackets "[]" replaced with your own identifying
17168404Spjd * information: Portions Copyright [yyyy] [name of copyright owner]
18168404Spjd *
19168404Spjd * CDDL HEADER END
20168404Spjd */
21168404Spjd/*
22185029Spjd * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23168404Spjd * Use is subject to license terms.
24168404Spjd */
25168404Spjd
26168404Spjd#ifndef	_SYS_LIST_H
27168404Spjd#define	_SYS_LIST_H
28168404Spjd
29168404Spjd#pragma ident	"%Z%%M%	%I%	%E% SMI"
30168404Spjd
31168404Spjd#include <sys/list_impl.h>
32168404Spjd
33168404Spjd#ifdef	__cplusplus
34168404Spjdextern "C" {
35168404Spjd#endif
36168404Spjd
37168404Spjdtypedef struct list_node list_node_t;
38168404Spjdtypedef struct list list_t;
39168404Spjd
40168404Spjdvoid list_create(list_t *, size_t, size_t);
41168404Spjdvoid list_destroy(list_t *);
42168404Spjd
43168404Spjdvoid list_insert_after(list_t *, void *, void *);
44168404Spjdvoid list_insert_before(list_t *, void *, void *);
45168404Spjdvoid list_insert_head(list_t *, void *);
46168404Spjdvoid list_insert_tail(list_t *, void *);
47168404Spjdvoid list_remove(list_t *, void *);
48185029Spjdvoid *list_remove_head(list_t *);
49185029Spjdvoid *list_remove_tail(list_t *);
50168404Spjdvoid list_move_tail(list_t *, list_t *);
51168404Spjd
52168404Spjdvoid *list_head(list_t *);
53168404Spjdvoid *list_tail(list_t *);
54168404Spjdvoid *list_next(list_t *, void *);
55168404Spjdvoid *list_prev(list_t *, void *);
56185029Spjdint list_is_empty(list_t *);
57168404Spjd
58185029Spjdvoid list_link_init(list_node_t *);
59185029Spjdvoid list_link_replace(list_node_t *, list_node_t *);
60185029Spjd
61168404Spjdint list_link_active(list_node_t *);
62168404Spjd
63168404Spjd#ifdef	__cplusplus
64168404Spjd}
65168404Spjd#endif
66168404Spjd
67168404Spjd#endif	/* _SYS_LIST_H */
68