Re: Question on KPI / NKE : sys/select.h : struct selinfo ?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com 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 --Jim _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... On May 5, 2005, at 2:12 AM, Steven Palm wrote: 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Jim Magee