Subject: Re: Moving to struct timespec in the kernel.
To: Matt Thomas <matt@3am-software.com>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: tech-kern
Date: 02/22/2005 18:39:26
In message <6.1.2.0.2.20050222161932.039ecae8@localhost>,
Matt Thomas writes:

>At 04:11 PM 2/22/2005, Jonathan Stone wrote:

>I couldn't see any reason to copy the fd_sets.  So I didn't. :)

I'm glad to hear it :)


>>Any thoughts on forking out the body of kevent() to support either a
>>timespec version, or a FreeBSD/i386-ABI emulation?
>
>I can't imagine it'd be all that difficult.  But I don't know
>what the FreeBSD version looks like.

IIRC, FreeBSD used 16-bit ints for fields in struct kevent where we
used 32-bit (or bigger) ints, and a 32-bit (intptr_t) filter-specific
field where we used a 64-bit field.  So the user-to-kernel ABI is
different on all platforms.

Last I looked, there was code nested inside a loop that walked a
pointer through the copied-in list. I could split the logic into a
kevent_common(), but tha'd mean walking the list twice, once to copy
the non-NetBSD args into the NetBSDD-native kevent format.

Hmm.  That still doesn't help the copyout()s in kqueue_scan(), called
from sys_kqueue().  I'll think about it.