From: knobo
Subject: documentation for unix:unix-fast-select on cmucl
Date: 
Message-ID: <1145092589.495783.17950@e56g2000cwe.googlegroups.com>
Where can I find documentation for unix:unix-fast-select on cmucl
I can't find it anywhere...
From: Pascal Bourguignon
Subject: Re: documentation for unix:unix-fast-select on cmucl
Date: 
Message-ID: <87hd4vj8hr.fsf@thalassa.informatimago.com>
"knobo" <······@gmail.com> writes:

> Where can I find documentation for unix:unix-fast-select on cmucl
> I can't find it anywhere...

1-  http://www.justfuckinggoogleit.com/search?q=unix-fast-select

Actually, google is SMART:

CMU Common Lisp :: 19a :: unix
See the unix Programmer's Manual for more information. [function]
unix-isatty fd accepts a unix file descriptor and Returns t if the
Device associated with ...
keithirwin.com/lisp/cmucl/pages/unix.html - 88k - Supplemental Result - Cached - Similar pages

--> See the unix man page: man select


2- Ask your implementation!

CMU Common Lisp 18e-pre2 2003-03-25-003, running on thalassa
With core: /local/languages/cmucl-18e/lib/cmucl/lib/lisp.core
Dumped on: Wed, 2003-03-26 00:53:00+01:00 on orion
See <http://www.cons.org/cmucl/> for support information.
Loaded subsystems:
    Python 1.1, target Intel x86
    CLOS 18e (based on PCL September 16 92 PCL (f))
* (describe 'unix:unix-fast-select)

UNIX-FAST-SELECT is an external symbol in the UNIX package.
Macro-function: #<Function (:MACRO UNIX:UNIX-FAST-SELECT) {103CAA61}>
Macro arguments:
  (num-descriptors read-fds write-fds exception-fds timeout-secs &optional
   (timeout-usecs 0))
Macro documentation:
  Perform the UNIX select(2) system call.
On Wednesday, 3/26/03 12:12:15 am [-1] it was compiled from:
target:code/unix-glibc2.lisp
  Created: Wednesday, 3/12/03 04:30:45 pm [-1]
  Comment: $Header: /home/CVS-cmucl/src/code/unix-glibc2.lisp,v 1.24 2003/03/08 17:51:52 pmai Exp $
* (macroexpand-1 '(unix:unix-fast-select num-descriptors read-fds write-fds exception-fds timeout-secs timeout-usecs))

(LET ((UNIX::TIMEOUT-SECS TIMEOUT-SECS))
  (ALIEN:WITH-ALIEN ((UNIX::TV (ALIEN:STRUCT UNIX:TIMEVAL)))
                    (WHEN UNIX::TIMEOUT-SECS
                      (SETF (ALIEN:SLOT UNIX::TV 'UNIX:TV-SEC)
                              UNIX::TIMEOUT-SECS)
                      (SETF (ALIEN:SLOT UNIX::TV 'UNIX:TV-USEC) TIMEOUT-USECS))
                    (UNIX::INT-SYSCALL
                     ("select" C-CALL:INT (* (ALIEN:STRUCT UNIX:FD-SET))
                      (* (ALIEN:STRUCT UNIX:FD-SET))
                      (* (ALIEN:STRUCT UNIX:FD-SET))
                      (* (ALIEN:STRUCT UNIX:TIMEVAL)))
                     NUM-DESCRIPTORS
                     READ-FDS
                     WRITE-FDS
                     EXCEPTION-FDS
                     (IF UNIX::TIMEOUT-SECS
                         (ALIEN:ALIEN-SAP (ALIEN:ADDR UNIX::TV))
                         (SYSTEM:INT-SAP 0)))))
T
* 

Note how unix-fast-select just expands to a call to the unix syscall: select(1).

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"You question the worthiness of my code? I should kill you where you
stand!"