This series seems like a good idea to me! I have a few review comments though:
Patch 1 seems strange. Shouldn't the counters themselves get freed at reset? If they are, shouldn't that lead to the number of counters reaching 0? I guess the input ABI should get bumped for the patch that stores per-device idle times. We decided to bump ABI more aggressively, right? I haven't checked: is it possible to build xserver without SYNC, or to disable it at runtime? If so, the final patch needs some conditionals, I assume. Here's a request you can ignore if you like: Please consider making SYSCOUNTERPRIV a static inline instead of a macro, and removing the cast from inside it. That'd be different from the usual idiom in the X server, but the usual idiom is dumb. :-) I'd prefer to see all the callers assign their "pointer pCounter"s to an appropriately-typed local once right at the beginning of the function, which also serves as documentation for what type you're supposed to pass in there. The series looks fine generally; these are just minor details. Jamey On 3/13/12, Peter Hutterer <[email protected]> wrote: > > We currently have one global idlecounter. This patch series adds additional > counters named "DEVICEIDLETIME n" (where n is the device id) that apply to > that device only. > > One use-case here is as syndaemon replacement. A client can simply put an > idlecounter on the keyboard above the touchpad. When that keyboard goes out > of idle, disable the touchpad, then re-enable when the keyboard goes idle > again. > > Cheers, > Peter > _______________________________________________ > [email protected]: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: http://lists.x.org/mailman/listinfo/xorg-devel > _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
