Home | History | Annotate | Line # | Download | only in sys
      1  1.1  haad /*
      2  1.1  haad  * CDDL HEADER START
      3  1.1  haad  *
      4  1.1  haad  * The contents of this file are subject to the terms of the
      5  1.1  haad  * Common Development and Distribution License (the "License").
      6  1.1  haad  * You may not use this file except in compliance with the License.
      7  1.1  haad  *
      8  1.1  haad  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9  1.1  haad  * or http://www.opensolaris.org/os/licensing.
     10  1.1  haad  * See the License for the specific language governing permissions
     11  1.1  haad  * and limitations under the License.
     12  1.1  haad  *
     13  1.1  haad  * When distributing Covered Code, include this CDDL HEADER in each
     14  1.1  haad  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15  1.1  haad  * If applicable, add the following below this CDDL HEADER, with the
     16  1.1  haad  * fields enclosed by brackets "[]" replaced with your own identifying
     17  1.1  haad  * information: Portions Copyright [yyyy] [name of copyright owner]
     18  1.1  haad  *
     19  1.1  haad  * CDDL HEADER END
     20  1.1  haad  */
     21  1.1  haad /*
     22  1.1  haad  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     23  1.1  haad  * Use is subject to license terms.
     24  1.1  haad  */
     25  1.1  haad 
     26  1.1  haad #ifndef	_SYS_LIST_H
     27  1.1  haad #define	_SYS_LIST_H
     28  1.1  haad 
     29  1.1  haad #pragma ident	"%Z%%M%	%I%	%E% SMI"
     30  1.1  haad 
     31  1.1  haad #include <sys/list_impl.h>
     32  1.1  haad 
     33  1.1  haad #ifdef	__cplusplus
     34  1.1  haad extern "C" {
     35  1.1  haad #endif
     36  1.1  haad 
     37  1.1  haad typedef struct list_node list_node_t;
     38  1.1  haad typedef struct list list_t;
     39  1.1  haad 
     40  1.1  haad void list_create(list_t *, size_t, size_t);
     41  1.1  haad void list_destroy(list_t *);
     42  1.1  haad 
     43  1.1  haad void list_insert_after(list_t *, void *, void *);
     44  1.1  haad void list_insert_before(list_t *, void *, void *);
     45  1.1  haad void list_insert_head(list_t *, void *);
     46  1.1  haad void list_insert_tail(list_t *, void *);
     47  1.1  haad void list_remove(list_t *, void *);
     48  1.1  haad void *list_remove_head(list_t *);
     49  1.1  haad void *list_remove_tail(list_t *);
     50  1.1  haad void list_move_tail(list_t *, list_t *);
     51  1.1  haad 
     52  1.1  haad void *list_head(list_t *);
     53  1.1  haad void *list_tail(list_t *);
     54  1.1  haad void *list_next(list_t *, void *);
     55  1.1  haad void *list_prev(list_t *, void *);
     56  1.1  haad int list_is_empty(list_t *);
     57  1.1  haad 
     58  1.1  haad void list_link_init(list_node_t *);
     59  1.1  haad void list_link_replace(list_node_t *, list_node_t *);
     60  1.1  haad 
     61  1.1  haad int list_link_active(list_node_t *);
     62  1.1  haad 
     63  1.1  haad #ifdef	__cplusplus
     64  1.1  haad }
     65  1.1  haad #endif
     66  1.1  haad 
     67  1.1  haad #endif	/* _SYS_LIST_H */
     68