1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

Kernel: Make sure we don't use any FPU/MMX/SSE instructions.

This commit is contained in:
Andreas Kling 2019-04-22 23:38:33 +02:00
parent 5c68929aa1
commit 2d7cad6a16
6 changed files with 10 additions and 16 deletions

View file

@ -10,20 +10,13 @@ RandomDevice::~RandomDevice()
{
}
// Simple rand() and srand() borrowed from the POSIX standard:
static dword next = 1;
static unsigned long next = 1;
#define MY_RAND_MAX 32767
int RandomDevice::random_value()
#define MY_RAND_MAX 4294967295U
dword RandomDevice::random_value()
{
next = next * 1103515245 + 12345;
return((unsigned)(next/((MY_RAND_MAX + 1) * 2)) % (MY_RAND_MAX + 1));
}
float RandomDevice::random_percentage()
{
return (float)random_value() / (float)MY_RAND_MAX;
return next;
}
#if 0