home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ixemul-45.0-src.tgz / tar.out / contrib / ixemul / library / select.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  2KB  |  79 lines

  1. /*
  2.  *  This file is part of ixemul.library for the Amiga.
  3.  *  Copyright (C) 1991, 1992  Markus M. Wild
  4.  *
  5.  *  This library is free software; you can redistribute it and/or
  6.  *  modify it under the terms of the GNU Library General Public
  7.  *  License as published by the Free Software Foundation; either
  8.  *  version 2 of the License, or (at your option) any later version.
  9.  *
  10.  *  This library is distributed in the hope that it will be useful,
  11.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  *  Library General Public License for more details.
  14.  *
  15.  *  You should have received a copy of the GNU Library General Public
  16.  *  License along with this library; if not, write to the Free
  17.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  *
  19.  *  select.h,v 1.1.1.1 1994/04/04 04:30:08 amiga Exp
  20.  *
  21.  *  select.h,v
  22.  * Revision 1.1.1.1  1994/04/04  04:30:08  amiga
  23.  * Initial CVS check in.
  24.  *
  25.  *  Revision 1.2  1993/11/05  22:14:53  mwild
  26.  *  new code for inet.library support
  27.  *
  28.  * Revision 1.1  1992/05/14  20:36:14  mwild
  29.  * Initial revision
  30.  *
  31.  */
  32.  
  33. #ifndef __SELECT_H__
  34. #define __SELECT_H__
  35.  
  36. /*
  37.  * definitions of arguments for select() implementation.
  38.  *
  39.  * Each file type that supports select has to look like this:
  40.  *
  41.  *  __..select (f, select_cmd, io_mode)
  42.  *
  43.  */
  44.  
  45. /*
  46.  * possible values for select_cmd
  47.  */
  48.  
  49. /* init a select, perhaps initiate a timeout call that can be checked with
  50.  * SELECT_CHECK
  51.  * Return a signal-mask to be used in Wait() that indicates that this file
  52.  * has changed mode.
  53.  */
  54. #define SELCMD_PREPARE    1
  55.  
  56. /* return whether io_mode on this file won't block */
  57. #define SELCMD_CHECK    2
  58.  
  59. /* same thing, but for a poll */
  60. #define SELCMD_POLL    10
  61.  
  62. /*
  63.  * possible values for io_mode
  64.  */
  65.  
  66. #define SELMODE_IN    0
  67. #define SELMODE_OUT    1
  68. #define SELMODE_EXC    2
  69.  
  70. /*
  71.  * if PREPARE does a timeout call, use this value (usec) for all these timeouts
  72.  */
  73.  
  74. #define SELTIMEOUT    999999
  75.  
  76. #define SELPKT_IN_USE(f) ((f)->f_select_sp.sp_Pkt.dp_Port)
  77.  
  78. #endif
  79.