Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

timer.c 610B

12345678910111213141516171819202122232425262728
  1. /* A couple of routines to implement a low-overhead timer for drivers */
  2. /*
  3. * This program is free software; you can redistribute it and/or
  4. * modify it under the terms of the GNU General Public License as
  5. * published by the Free Software Foundation; either version 2, or (at
  6. * your option) any later version.
  7. */
  8. #include "etherboot.h"
  9. #include "timer.h"
  10. /* Machine Independant timer helper functions */
  11. void mdelay(unsigned int msecs)
  12. {
  13. unsigned int i;
  14. for(i = 0; i < msecs; i++) {
  15. udelay(1000);
  16. }
  17. }
  18. void waiton_timer2(unsigned int ticks)
  19. {
  20. load_timer2(ticks);
  21. while(timer2_running()) {
  22. }
  23. }