/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*
* MODULE: dapl_llist.c
*
* PURPOSE: Manage doubly linked lists within the DAPL Reference Implementation
*
* A link list head points to the first member of a linked list, but
* is itself not a member of the list.
*
* +---------------------------------------------+
* | entry entry entry |
* HEAD -> | +-------+ +-------+ +-------+ |
* +--> | flink | --> | flink | --> | flink | >--+
* | data | | data | | data |
* +--< | blink | <-- | blink | <-- | blink | <--|
* | +-------+ +-------+ +-------+ |
* | |
* +---------------------------------------------+
*
* Note: Each of the remove functions takes an assertion failure if
* an element cannot be removed from the list.
*
* $Id: dapl_llist.c,v 1.9 2003/06/13 12:21:11 sjs2 Exp $
*/
#include "dapl.h"
/*
* dapl_llist_init_head()
*
* Purpose: initialize a linked list head
*/
void
{
}
/*
* dapl_llist_init_entry()
*
* Purpose: initialize a linked list entry
*/
void
{
}
/*
* dapl_llist_is_empty()
*
* Purpose: returns TRUE if the linked list is empty
*/
{
}
/*
* dapl_llist_add_head()
*
* Purpose: Add an entry to the head of a linked list
*/
void
void *data)
{
/* deal with empty list */
if (dapl_llist_is_empty(head)) {
} else {
}
}
/*
* dapl_llist_add_tail()
*
* Purpose: Add an entry to the tail of a linked list
*/
void
void *data)
{
/* deal with empty list */
if (dapl_llist_is_empty(head)) {
} else {
}
}
/*
* dapl_llist_add_entry()
*
* Purpose: Add an entry before an element in the list
*/
void
void * data)
{
/* deal with empty list */
if (dapl_llist_is_empty(head)) {
} else {
}
}
/*
* dapl_llist_remove_head()
*
* Purpose: Remove the first entry of a linked list
*/
void *
{
}
/* clean up the links for good measure */
}
/*
* dapl_llist_remove_tail()
*
* Purpose: Remove the last entry of a linked list
*/
void *
{
}
/* clean up the links for good measure */
}
/*
* dapl_llist_remove_entry()
*
* Purpose: Remove the specified entry from a linked list
*/
void *
{
/* if it's the first entry, pull it off */
/* if it was the only entry, kill the list */
}
}
#ifdef VERIFY_LINKED_LIST
else {
for (;;) {
/*
* not finding the element on the list
* is a BAD thing
*/
dapl_os_assert(0);
break;
}
break;
}
}
}
#endif /* VERIFY_LINKED_LIST */
}
/*
* dapl_llist_peek_head
*/
void *
{
}
/*
* dapl_llist_next_entry
*
* Obtain the next entry in the list, return NULL when we get to the
* head
*/
void *
{
} else {
return (NULL);
}
}
}
/*
* dapl_llist_debug_print_list()
*
* Purpose: Prints the linked list for debugging
*/
void
{
if (!first) {
return;
}
}
}