Project

General

Profile

Bug #196 ยป select.patch

slynko, 06/08/2006 04:55 PM

View differences:

games/larn/monster.c 8 Jun 2006 14:54:05 -0000
free((char*)save); positionplayer(); return;
}
case 37: /* permanence */ adjtime(-99999L); spelknow[37]=0; /* forget */
case 37: /* permanence */ _adjtime(-99999L); spelknow[37]=0; /* forget */
loseint();
return;
games/larn/object.c 8 Jun 2006 11:53:25 -0000
/*
* function to adjust time when time warping and taking courses in school
*/
adjtime(tim)
_adjtime(tim)
long tim;
{
int j;
......
case 7: gtime += (i = rnd(1000) - 850); /* time warp */
if (i>=0) lprintf("\nYou went forward in time by %d mobuls",(long)((i+99)/100));
else lprintf("\nYou went backward in time by %d mobuls",(long)(-(i+99)/100));
adjtime((long)i); /* adjust time for time warping */
_adjtime((long)i); /* adjust time for time warping */
return;
case 8: oteleport(0); return; /* teleportation */
games/larn/store.c 8 Jun 2006 15:00:16 -0000
if (c[BLINDCOUNT]) c[BLINDCOUNT]=1; /* cure blindness too! */
if (c[CONFUSE]) c[CONFUSE]=1; /* end confusion */
adjtime((long)time_used); /* adjust parameters for time change */
_adjtime((long)time_used); /* adjust parameters for time change */
}
nap(1000);
}
include/unistd.h 13 Apr 2006 01:04:30 -0000
int getopt(int, char * const [], const char *);
#ifndef _POSIX_SOURCE
#ifdef __STDC__
struct timeval; /* select(2) */
#endif
int acct(const char *);
int async_daemon (void);
int brk(const void *);
......
int rresvport_af(int *, int);
int ruserok(const char *, int, const char *, const char *);
void *sbrk(intptr_t);
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
int setdomainname(const char *, int);
int setegid(gid_t);
int seteuid(uid_t);
sys/bus/firewire/firewirereg.h 20 Apr 2006 22:14:44 -0000
typedef struct proc fw_proc;
#endif
#include <sys/select.h>
#include <sys/selinfo.h>
#include <sys/uio.h>
struct fw_device{
sys/bus/pccard/slot.h 20 Apr 2006 22:15:05 -0000
#include <machine/bus.h>
#include <sys/rman.h>
#include <machine/resource.h>
#include <sys/select.h>
#include <sys/selinfo.h>
/*
* Controller data - Specific to each slot controller.
sys/dev/misc/mse/mse.c 24 Apr 2006 20:48:38 -0000
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/poll.h>
#include <sys/select.h>
#include <sys/selinfo.h>
#include <sys/thread2.h>
#include <sys/uio.h>
sys/dev/misc/psm/psm.c 24 Apr 2006 20:59:16 -0000
#include <sys/malloc.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <sys/select.h>
#include <sys/selinfo.h>
#include <sys/thread2.h>
#include <sys/time.h>
#include <sys/uio.h>
sys/dev/misc/syscons/apm/apm_saver.c 24 Apr 2006 21:10:51 -0000
#include <dev/video/fb/splashreg.h>
#include "../syscons.h"
#include <sys/select.h>
#include <sys/selinfo.h>
#include <machine/apm_bios.h>
#include <machine/pc/bios.h>
#include <i386/apm/apm.h>
sys/dev/misc/tw/tw.c 24 Apr 2006 20:55:08 -0000
#include <sys/kernel.h>
#include <sys/uio.h>
#include <sys/syslog.h>
#include <sys/select.h>
#include <sys/selinfo.h>
#include <sys/poll.h>
#include <sys/thread2.h>
sys/dev/raid/aac/aacvar.h 5 Jun 2006 22:19:37 -0000
#define AAC_LOCK_RELEASE(l) lockmgr(l, LK_RELEASE)
#endif
#if defined(__FreeBSD__) && __FreeBSD_version >= 500005
#include <sys/selinfo.h>
#else
#include <sys/select.h>
#endif
/*
* Per-controller structure.
sys/dev/video/bktr/bktr_i2c.c 24 Apr 2006 17:31:27 -0000
#include <sys/bus.h>
#include <sys/uio.h>
#include <sys/select.h>
#include <sys/selinfo.h>
#include <bus/pci/pcivar.h>
#include <bus/pci/pcireg.h>
sys/i386/acpica5/acpi_machdep.c 24 Apr 2006 17:36:11 -0000
* APM driver emulation
*/
#include <sys/select.h>
#include <sys/selinfo.h>
#include <machine/apm_bios.h>
#include <machine/pc/bios.h>
sys/i386/apm/apm.c 24 Apr 2006 17:37:35 -0000
#include <sys/time.h>
#include <sys/reboot.h>
#include <sys/bus.h>
#include <sys/select.h>
#include <sys/selinfo.h>
#include <sys/poll.h>
#include <sys/fcntl.h>
#include <sys/uio.h>
sys/i386/isa/asc.c 12 May 2006 10:43:36 -0000
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/poll.h>
#include <sys/select.h>
#include <sys/selinfo.h>
#include <sys/uio.h>
#include <sys/thread2.h>
sys/kern/kern_random.c 26 May 2006 11:29:45 -0000
#include <sys/md5.h>
#include <sys/poll.h>
#include <sys/random.h>
#include <sys/select.h>
#include <sys/selinfo.h>
#include <sys/systm.h>
#include <sys/systimer.h>
#include <sys/thread2.h>
sys/net/bpfdesc.h 20 Apr 2006 23:05:40 -0000
#define _NET_BPFDESC_H_
#include <sys/callout.h>
#include <sys/select.h>
#include <sys/selinfo.h>
/*
* Descriptor associated with each open bpf file.
sys/net/i4b/layer4/i4b_i4bdrv.c 20 Apr 2006 23:16:27 -0000
#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/thread2.h>
#include <sys/select.h>
#include <sys/selinfo.h>
#include <net/if.h>
sys/sys/eventvar.h 26 May 2006 11:28:02 -0000
#ifndef _SYS_EVENT_H_
#include <sys/event.h>
#endif
#ifndef _SYS_SELECT_H_
#include <sys/select.h>
#ifndef _SYS_SELINFO_H_
#include <sys/selinfo.h>
#endif
sys/sys/pipe.h 22 May 2006 10:00:31 -0000
#ifndef _SYS_TIME_H_
#include <sys/time.h> /* for struct timespec */
#endif
#ifndef _SYS_SELECT_H_
#include <sys/select.h> /* for struct selinfo */
#ifndef _SYS_SELINFO_H_
#include <sys/selinfo.h> /* for struct selinfo */
#endif
#ifndef _SYS_XIO_H_
#include <sys/xio.h> /* for struct xio */
sys/sys/select.h 8 Jun 2006 10:33:22 -0000
#ifndef _SYS_SELECT_H_
#define _SYS_SELECT_H_
#if defined(_KERNEL) || defined(_KERNEL_STRUCTURES)
#ifndef _SYS_EVENT_H_
#include <sys/event.h> /* for struct klist */
#ifndef _SYS_SIGNAL_H_
#include <sys/signal.h>
#endif
#ifndef _SYS_NETISR_H_
#include <net/netisr.h> /* for struct notifymsglist */
#ifndef _SYS_TIME_H_
#include <sys/time.h>
#endif
/*
* Used to maintain information about processes that wish to be
* notified when I/O becomes possible.
* Select uses bit masks of file descriptors in longs. These macros
* manipulate such bit fields (the filesystem macros use chars).
* FD_SETSIZE may be defined by the user, but the default here should
* be enough for most uses.
*/
struct selinfo {
pid_t si_pid; /* process to be notified */
struct klist si_note; /* kernel note list */
struct notifymsglist si_mlist; /* list of pending predicate messages */
short si_flags; /* see below */
};
#define SI_COLL 0x0001 /* collision occurred */
#ifndef FD_SETSIZE
#define FD_SETSIZE 1024
#endif
#ifndef NBBY
#define NBBY 8
#endif
#ifdef _KERNEL
struct thread;
typedef unsigned long fd_mask;
#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
void selrecord (struct thread *selector, struct selinfo *);
void selwakeup (struct selinfo *);
#ifndef howmany
#define howmany(x, y) (((x) + ((y) - 1)) / (y))
#endif
#endif /* _KERNEL || _KERNEL_STRUCTURES */
typedef struct fd_set {
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
} fd_set;
#define _fdset_mask(n) ((fd_mask)1 << ((n) % NFDBITS))
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= _fdset_mask(n))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~_fdset_mask(n))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & _fdset_mask(n))
#define FD_COPY(f, t) bcopy(f, t, sizeof(*(f)))
#define FD_ZERO(p) bzero(p, sizeof(*(p)))
int select(int, fd_set * __restrict, fd_set * __restrict, fd_set * __restrict,
struct timeval * __restrict);
#endif /* !_SYS_SELECT_H_ */
sys/sys/selinfo.h 8 Jun 2006 19:07:58 -0000
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)selinfo.h 8.2 (Berkeley) 1/4/94
*/
#ifndef _SYS_SELINFO_H_
#define _SYS_SELINFO_H_
#if defined(_KERNEL) || defined(_KERNEL_STRUCTURES)
#include <sys/signal.h>
#include <sys/event.h> /* for struct klist */
#include <net/netisr.h> /* for struct notifymsglist */
/*
* Used to maintain information about processes that wish to be
* notified when I/O becomes possible.
*/
struct selinfo {
pid_t si_pid; /* process to be notified */
struct klist si_note; /* kernel note list */
struct notifymsglist si_mlist; /* list of pending predicate messages */
short si_flags; /* see below */
};
#define SI_COLL 0x0001 /* collision occurred */
struct thread;
void selrecord (struct thread *selector, struct selinfo *);
void selwakeup (struct selinfo *);
#endif
#endif /* !_SYS_SELINFO_H_ */
sys/sys/socketvar.h 22 May 2006 10:07:05 -0000
#ifndef _SYS_QUEUE_H_
#include <sys/queue.h> /* for TAILQ macros */
#endif
#ifndef _SYS_SELECT_H_
#include <sys/select.h> /* for struct selinfo */
#ifndef _SYS_SELINFO_H_
#include <sys/selinfo.h> /* for struct selinfo */
#endif
#if defined(_KERNEL) || defined(_KERNEL_STRUCTURES)
sys/sys/tty.h 22 May 2006 09:58:40 -0000
#ifndef _SYS_TERMIOS_H_
#include <sys/termios.h>
#endif
#ifndef _SYS_SELECT_H_
#include <sys/select.h> /* For struct selinfo. */
#ifndef _SYS_SELINFO_H_
#include <sys/selinfo.h>
#endif
/*
sys/sys/types.h 8 Jun 2006 12:28:09 -0000
typedef __timer_t timer_t;
#endif
#ifndef _POSIX_SOURCE
#define NBBY 8 /* number of bits in a byte */
/*
* Select uses bit masks of file descriptors in longs. These macros
* manipulate such bit fields (the filesystem macros use chars).
* FD_SETSIZE may be defined by the user, but the default here should
* be enough for most uses.
*/
#ifndef FD_SETSIZE
#define FD_SETSIZE 1024
#ifndef _SYS_SELECT_H_
#include <sys/select.h>
#endif
typedef unsigned long fd_mask;
#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
#ifndef howmany
#define howmany(x, y) (((x) + ((y) - 1)) / (y))
#endif
typedef struct fd_set {
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
} fd_set;
#define _fdset_mask(n) ((fd_mask)1 << ((n) % NFDBITS))
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= _fdset_mask(n))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~_fdset_mask(n))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & _fdset_mask(n))
#define FD_COPY(f, t) bcopy(f, t, sizeof(*(f)))
#define FD_ZERO(p) bzero(p, sizeof(*(p)))
#ifndef _POSIX_SOURCE
#define NBBY 8 /* number of bits in a byte */
/*
* These declarations belong elsewhere, but are repeated here and in
* <stdio.h> to give broken programs a better chance of working with
sys/sys/vnode.h 5 Jun 2006 22:19:56 -0000
#ifndef _SYS_LOCK_H_
#include <sys/lock.h>
#endif
#ifndef _SYS_SELECT_H_
#include <sys/select.h>
#ifndef _SYS_SELINFO_H_
#include <sys/selinfo.h>
#endif
#ifndef _SYS_BIOTRACK_H_
#include <sys/biotrack.h>
    (1-1/1)