Michel Dänzer <[EMAIL PROTECTED]> writes: > On Fre, 2002-11-01 at 21:10, [EMAIL PROTECTED] wrote: > > Yes, XSYNC has the right things to allow applications to synchronize > > on arbitrary things (including vertical sync). > > > > If the fbdev and/or DRI folks are willing to support and export an interface, > > it should be possible to get the plumbing hooked up. > > > > Just make it a file descriptor we (and/or other things) can select against, > > and it should be something that can be pretty cross platform without much > > trouble: them's that don't implement it on a given platform won't get > > support... > > The interface we've implemented in the DRM is an ioctl which basically > blocks for a requested number of vertical blanks (it's more flexible in > fact). Maybe a daemon or something could provide a file descriptor to > select against?
Both select and a blocking ioctl are really the wrong interface here. select() or poll() are problematical because select() waits for a condition, not an event. That is, these function calls are designed things like "tell me when there is more data to read". The blocking ioctl is a pain because it means you have to devote a thread to waiting for the VBI; but it at least is well defined. Unix signals are another possibility - a real pain to program, but at least they were designed for things like this. "Tell me when the next VBI occurs" has very similar semantics to alarm(2). Regards, Owen _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert