unsigned long cycleh, cycle; do { cycleh = rdcycleh(); cycle = rdcycle(); } while (cycleh != rdcycleh());