/*
* 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
* 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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define MIN(x, y) ((x) > (y) ? (y) : (x))
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "libmicro.h"
static int optr = 0;
static int optw = 0;
static int optx = 0;
static int *fds;
static int maxfd = 0;
static int target = 0;
int
{
lm_tsdsize = 0;
" [-n fds-per-thread (default %d)]\n"
" [-r readable-fds (default 0)]\n"
" [-w writeable-fds (default 0)]\n"
" [-x] (start -r option with highest fd first; "
"default is lowest first)\n"
"notes: measures select()\n",
DEFN);
return (0);
}
int
{
switch (opt) {
case 'n':
break;
case 'r':
break;
case 'w':
break;
case 'x':
optx = 1;
break;
default:
return (-1);
}
return (0);
}
int
{
int i;
int j;
if (optn % 2 != 0) {
(void) printf("ERROR: -n value must be even\n");
return (-1);
}
(void) printf("ERROR: -n, -r and -w values must be > 0\n");
return (-1);
}
(void) printf("ERROR: -r and -w values must be <= maxfd\n");
return (-1);
}
(void) printf("ERROR: malloc() failed\n");
return (-1);
}
for (i = 0; i < optn; i += 2) {
(void) printf("ERROR: socketpair() failed\n");
return (-1);
}
if (maxfd > FD_SETSIZE) {
(void) printf("WARNING: FD_SETSIZE is too small!\n");
return (-1);
}
}
for (i = 0; i < optw; i++) {
}
if (optx) {
}
} else {
for (i = 0; i < optr; i++) {
}
}
return (0);
}
/*ARGSUSED*/
int
{
int i;
if (optw) {
}
for (i = 0; i < lm_optB; i++) {
}
}
return (0);
}
char *
{
flags[3] = 0;
return (result);
}