On Wed, 2015-11-11 at 22:02 -0800, Keith Packard wrote:
> 
>  static void
> -LinuxApmWakeup(void *blockData, int result, void *pReadmask)
> +LinuxApmNotify(int fd, int mask, void *blockData)
>  {
> -    fd_set *readmask = (fd_set *) pReadmask;
> -
> -    if (result > 0 && LinuxApmFd >= 0 && FD_ISSET(LinuxApmFd, readmask)) {
> +    if (LinuxApmFd >= 0) {
>          apm_event_t event;
>          Bool running = LinuxApmRunning;
>          int cmd = APM_IOC_SUSPEND;

This tripped me up at first (here and elsewhere in the series), it
looks weird to read an fd that isn't the one passed in as an argument. 
I think you'd generate infinitesimally better code to use the argument
and not the global since the argument form is never going to be a cache
miss; I'm not sure I care enough to press the point, but maybe that's
measurable on arm or something.

- ajax
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to