(*
    Title: 	UNIX Synchronous IO
    LastEdit:	"Mon Jan 25 15:09:16 1988"
    Author: 	Derek McAuley,Oms1,4663,329629
		Cambridge University Computer Laboratory
*)

DEFINITION MODULE UnixSelect;


EXPORT QUALIFIED 
  ValidFD,

  TimeVal,
  
  WaitForRead, WaitForWrite, LastThread, Poll, Select;

  
CONST
  ValidFD = 32; (* Currently only allow 32 file descriptors *)
  
  
TYPE
  TimeVal = 
    RECORD
      secs,
      usecs:CARDINAL;
    END;


PROCEDURE WaitForRead(fd:INTEGER);

PROCEDURE WaitForWrite(fd:INTEGER);

PROCEDURE LastThread();

PROCEDURE Poll();

PROCEDURE Select(
      nfds:INTEGER; 
  VAR readFs, writeFs, exceptFs:ARRAY OF BITSET;
  VAR timeout:TimeVal
 ):INTEGER;

END UnixSelect.
