Merge branch 'master' of git://github.com/illumos/illumos-gate
[unleashed.git] / usr / src / grub / grub-0.97 / netboot / timer.c
blobe4f62421e54d7c0232febd531ced5f9ec8d61036
1 /* A couple of routines to implement a low-overhead timer for drivers */
3 /*
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2, or (at
7 * your option) any later version.
8 */
9 #include "grub.h"
10 #include "timer.h"
12 /* Machine Independant timer helper functions */
14 void mdelay(unsigned int msecs)
16 unsigned int i;
17 for(i = 0; i < msecs; i++) {
18 udelay(1000);
19 poll_interruptions();
23 void waiton_timer2(unsigned int ticks)
25 load_timer2(ticks);
26 while(timer2_running()) {
27 poll_interruptions();