/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <pthread.h>
#include <malloc.h>
#include <memory.h>
#include <assert.h>
#include <poll.h>
#include <stdio.h>
#include "llt.h"
void
{
}
void
{
}
/*
* apply the function func to every element of the ll in sequence. Can
* be used to free up the element, so "n" is computed before func is
* called on it.
*/
void
{
ll_t *n;
while (t) {
n = t->n;
func(t);
t = n;
}
}
ll_t *
{
}
ll_t *
{
return (ptr);
}
ll_t *
{
ll_t *t;
while (t) {
case 1:
return (NULL);
case 0:
prev = &(t->n);
t = t->n;
break;
case -1:
return (t);
}
}
return (NULL);
}
/* Make sure the list isn't corrupt and returns number of list items */
int
{
int i = 0;
while (ptr) {
i++;
}
return (i);
}