aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/kernel.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-01-22 14:20:22 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-01-22 14:20:22 +0000
commite8c1abd6e75d35e747611bcad82d0d4a6564beca (patch)
tree932aa4b778d3c4871b21f89eaa4db484c34e1d21 /extras/mini-os/kernel.c
parentdfba81d2fcc227ffc2ce546d9884580f682e68b5 (diff)
downloadxen-e8c1abd6e75d35e747611bcad82d0d4a6564beca.tar.gz
xen-e8c1abd6e75d35e747611bcad82d0d4a6564beca.tar.bz2
xen-e8c1abd6e75d35e747611bcad82d0d4a6564beca.zip
minios: POSIX fixes
Fixes some functions which are POSIX. Also make them ifndef HAVE_LIBC. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/kernel.c')
-rw-r--r--extras/mini-os/kernel.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/extras/mini-os/kernel.c b/extras/mini-os/kernel.c
index 6e56315549..a94e743f63 100644
--- a/extras/mini-os/kernel.c
+++ b/extras/mini-os/kernel.c
@@ -80,7 +80,7 @@ static void periodic_thread(void *p)
{
gettimeofday(&tv, NULL);
printk("T(s=%ld us=%ld)\n", tv.tv_sec, tv.tv_usec);
- sleep(1000);
+ msleep(1000);
}
}
@@ -89,19 +89,6 @@ static void netfront_thread(void *p)
init_netfront(NULL, NULL, NULL);
}
-#define RAND_MIX 2654435769U
-
-/* Should be random enough for this use */
-static int rand(void)
-{
- static unsigned int previous;
- struct timeval tv;
- gettimeofday(&tv, NULL);
- previous += tv.tv_sec + tv.tv_usec;
- previous *= RAND_MIX;
- return previous;
-}
-
static struct blkfront_dev *blk_dev;
static uint64_t blk_sectors;
static unsigned blk_sector_size;