Merge remote-tracking branch 'herrb/master'
This commit is contained in:
		
						commit
						1940508a4a
					
				| 
						 | 
					@ -2731,27 +2731,24 @@ IdleTimeBlockHandler(void *pCounter, struct timeval **wt, void *LastSelectMask)
 | 
				
			||||||
         * If we've been idle more than it, and someone wants to know about
 | 
					         * If we've been idle more than it, and someone wants to know about
 | 
				
			||||||
         * that level-triggered, schedule an immediate wakeup.
 | 
					         * that level-triggered, schedule an immediate wakeup.
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        unsigned long timeout = -1;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (XSyncValueLessThan(idle, *greater)) {
 | 
					        if (XSyncValueLessThan(idle, *greater)) {
 | 
				
			||||||
            XSyncValue value;
 | 
					            XSyncValue value;
 | 
				
			||||||
            Bool overflow;
 | 
					            Bool overflow;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            XSyncValueSubtract(&value, *greater, idle, &overflow);
 | 
					            XSyncValueSubtract(&value, *greater, idle, &overflow);
 | 
				
			||||||
            timeout = min(timeout, XSyncValueLow32(value));
 | 
					            AdjustWaitForDelay(wt, XSyncValueLow32(value));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
            for (list = counter->sync.pTriglist; list;
 | 
					            for (list = counter->sync.pTriglist; list;
 | 
				
			||||||
                 list = list->next) {
 | 
					                 list = list->next) {
 | 
				
			||||||
                trig = list->pTrigger;
 | 
					                trig = list->pTrigger;
 | 
				
			||||||
                if (trig->CheckTrigger(trig, old_idle)) {
 | 
					                if (trig->CheckTrigger(trig, old_idle)) {
 | 
				
			||||||
                    timeout = min(timeout, 0);
 | 
					                    AdjustWaitForDelay(wt, 0);
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        AdjustWaitForDelay(wt, timeout);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    counter->value = old_idle;  /* pop */
 | 
					    counter->value = old_idle;  /* pop */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue