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