/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <strings.h>
#include "prtable.h"
#include "prutil.h"
#include "prfile.h"
static int fd_max;
static int fd_cnt;
static int fd_cnt_cur;
static int fd_cnt_old;
void
fd_init(int n)
{
fd_max = n;
}
void
fd_exit()
{
if (fd_tbl)
}
void
{
if (fdp) {
fd_cnt--;
}
}
}
void
{
int i;
for (i = 0; i < fd_max; i++) {
fdp++;
}
}
static void
{
int counter;
int i;
continue; /* skip recycled ones */
fd_cnt--;
counter--;
}
if (counter == 0)
break;
}
}
fd_t *
{
int fd;
fd_recycle();
fd_cnt_cur++;
return (fdp);
}
}
if (fd == -1) {
fd_recycle();
goto again;
}
} else {
fd_cnt++;
fd_cnt_cur++;
}
return (fdp_new);
}
int
{
}
void
{
fd_cnt_cur = 0;
}
fds_t *
{
return (fdsp);
return (fdsp);
}
void
{
if (fds) { /* if pid was found */
if (fds_prev)
else
}
}