xref: /titanic_50/usr/src/cmd/sgs/include/list.h (revision 28bda19c304ae9f3ffa10394ef34c6e8f9e4c5f5)
1*28bda19cSRod Evans /*
2*28bda19cSRod Evans  * CDDL HEADER START
3*28bda19cSRod Evans  *
4*28bda19cSRod Evans  * The contents of this file are subject to the terms of the
5*28bda19cSRod Evans  * Common Development and Distribution License (the "License").
6*28bda19cSRod Evans  * You may not use this file except in compliance with the License.
7*28bda19cSRod Evans  *
8*28bda19cSRod Evans  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*28bda19cSRod Evans  * or http://www.opensolaris.org/os/licensing.
10*28bda19cSRod Evans  * See the License for the specific language governing permissions
11*28bda19cSRod Evans  * and limitations under the License.
12*28bda19cSRod Evans  *
13*28bda19cSRod Evans  * When distributing Covered Code, include this CDDL HEADER in each
14*28bda19cSRod Evans  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*28bda19cSRod Evans  * If applicable, add the following below this CDDL HEADER, with the
16*28bda19cSRod Evans  * fields enclosed by brackets "[]" replaced with your own identifying
17*28bda19cSRod Evans  * information: Portions Copyright [yyyy] [name of copyright owner]
18*28bda19cSRod Evans  *
19*28bda19cSRod Evans  * CDDL HEADER END
20*28bda19cSRod Evans  */
21*28bda19cSRod Evans 
22*28bda19cSRod Evans /*
23*28bda19cSRod Evans  *	Copyright (c) 1988 AT&T
24*28bda19cSRod Evans  *	  All Rights Reserved
25*28bda19cSRod Evans  *
26*28bda19cSRod Evans  *
27*28bda19cSRod Evans  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
28*28bda19cSRod Evans  * Use is subject to license terms.
29*28bda19cSRod Evans  *
30*28bda19cSRod Evans  * This file maintains an old style of list processing that is required by
31*28bda19cSRod Evans  * librtld_db to iterate over older core files/process images.
32*28bda19cSRod Evans  */
33*28bda19cSRod Evans #ifndef	_LIST_H
34*28bda19cSRod Evans #define	_LIST_H
35*28bda19cSRod Evans 
36*28bda19cSRod Evans #ifdef	__cplusplus
37*28bda19cSRod Evans extern "C" {
38*28bda19cSRod Evans #endif
39*28bda19cSRod Evans 
40*28bda19cSRod Evans #include <sys/elftypes.h>
41*28bda19cSRod Evans 
42*28bda19cSRod Evans typedef	struct listnode	Listnode;
43*28bda19cSRod Evans typedef	struct list	List;
44*28bda19cSRod Evans 
45*28bda19cSRod Evans struct	listnode {			/* a node on a linked list */
46*28bda19cSRod Evans 	void		*data;		/* the data item */
47*28bda19cSRod Evans 	Listnode	*next;		/* the next element */
48*28bda19cSRod Evans };
49*28bda19cSRod Evans 
50*28bda19cSRod Evans struct	list {				/* a linked list */
51*28bda19cSRod Evans 	Listnode	*head;		/* the first element */
52*28bda19cSRod Evans 	Listnode	*tail;		/* the last element */
53*28bda19cSRod Evans };
54*28bda19cSRod Evans 
55*28bda19cSRod Evans 
56*28bda19cSRod Evans #ifdef _SYSCALL32
57*28bda19cSRod Evans typedef	struct listnode32	Listnode32;
58*28bda19cSRod Evans typedef	struct list32		List32;
59*28bda19cSRod Evans 
60*28bda19cSRod Evans struct	listnode32 {			/* a node on a linked list */
61*28bda19cSRod Evans 	Elf32_Addr	data;		/* the data item */
62*28bda19cSRod Evans 	Elf32_Addr	next;		/* the next element */
63*28bda19cSRod Evans };
64*28bda19cSRod Evans 
65*28bda19cSRod Evans struct	list32 {			/* a linked list */
66*28bda19cSRod Evans 	Elf32_Addr	head;		/* the first element */
67*28bda19cSRod Evans 	Elf32_Addr	tail;		/* the last element */
68*28bda19cSRod Evans };
69*28bda19cSRod Evans #endif	/* _SYSCALL32 */
70*28bda19cSRod Evans 
71*28bda19cSRod Evans #ifdef	__cplusplus
72*28bda19cSRod Evans }
73*28bda19cSRod Evans #endif
74*28bda19cSRod Evans 
75*28bda19cSRod Evans #endif /* _LIST_H */
76