Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 1996 14:31:52 +0000
From:      Matt Thomas <matt@lkg.dec.com>
To:        hackers@freefall.FreeBSD.org, chat@freebsd.com, terry@lambert.org, "Kaleb S. KEITHLEY" <kaleb@x.org>
Subject:   Re: Forgiving select() call. 
Message-ID:  <199605281431.OAA18898@whydos.lkg.dec.com>
In-Reply-To: Your message of "Tue, 28 May 1996 07:18:48 EST." <199605281118.HAA17563@exalt.x.org> 

next in thread | previous in thread | raw e-mail | index | archive | help

In  <199605281118.HAA17563@exalt.x.org> , you wrote:

Since Kaleb mentioned Digital UNIX as one O/S that implements poll,
I though it might be useful to elaborate on that a bit.

Digital UNIX has both the poll(2) and select(2) system calls.  Both
are syscalls in fact.  However, since poll has more functionality 
that select the kernel infrastructure is build around poll rather
than select.  The select kernel code actually calls poll code in
side the kernel.  Internally, the kernel uses a timeval; poll's ms
timeout gets converted to a timeval.

When the _select routine (like soo_select) gets called, instead of

    int soo_select(struct file *fp, int which, struct proc *p)

as in BSD4.4, it gets defined as

    int soo_select(struct file *fp, int *events, int *revents, int scanning)

and the code uses the *events to set the appropriate bits in *revents.


-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt.html
Westford, MA              Disclaimer: I disavow all knowledge of this message





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605281431.OAA18898>