Re: Question on KPI / NKE : sys/select.h : struct selinfo ?
Re: Question on KPI / NKE : sys/select.h : struct selinfo ?
- Subject: Re: Question on KPI / NKE : sys/select.h : struct selinfo ?
- From: Jim Magee <email@hidden>
- Date: Thu, 5 May 2005 11:29:06 -0400
On May 5, 2005, at 2:12 AM, Steven Palm wrote:
A question on sys/select.h / selinfo as used in a kext:
I see this defined in sys/select.h:
/*
* Used to maintain information about processes that wish to be
* notified when I/O becomes possible.
*/
struct selinfo;
__BEGIN_DECLS
void selrecord(proc_t selector, struct selinfo *, void *);
void selwakeup(struct selinfo *);
void selthreadclear(struct selinfo *);
__END_DECLS
But the selinfo structure is not actually defined anywhere here...
Should it be? The code I am trying to work with is doing this
definition and these calls:
As with the other structures that Josh pointed out, we (seemingly
incorrectly) determined that it would be difficult to create a KPI-
conforming driver that used the selinfo mechanism. So we made it
opaque (its size did grow in Tiger/Darwin8 making existing binaries
that allocated them incompatible).
Now that we have discovered a couple of drivers that could otherwise
be KPI-conforming if not for this, we will be creating a KPI to
allocate a selinfo structure dynamically. In the meantime, you can
just allocate memory large to be safe. Future versions of selinfo
will be smaller than the current one. But to be safe. at least
doubling the size of the current selinfo struct should suffice (to
say 64 bytes). You should have no reason to look inside the structure.
--Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden