[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Network and USB problems with NetUSBee
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2011-08-04 14:03, Paul Wratt wrote:
> if this is the case, a small workaround prg, that does enough to
> slow down packet management (and user adjustable), would allow people
> to use >=1.17.0 (maybe supplied with the patched inet.xdd)
You mean something like this which uses up all of the available cpu time
- - All of it? :-)
#include <cstdlib>
#include <cmath>
/* Burn as much cpu time as possible.
Compile with
g++ -O2 -Wall -o foo foo.cpp
*/
int main(int a, char* b[])
{
double foo(0.0);
double bar(0.0);
while(true)
{
foo = drand48();
/* Just generating a ramdom number might not be enough
because the compiler could figure out that the result
is never used and optimise the call away.
*/
bar = tan(foo);
bar /= M_PI_2;
};
/* Placate the compiler. This never returns. Stop with CTRL-C. */
return 0;
}
Cheers,
T.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk47J/wACgkQMiyRSD9s+zW/JwCfdkklOGU9w7ka21VmjcsO7bFr
4O4AnRUxjU6HtO0Bdx18WPXFMBkLf1aK
=GiGL
-----END PGP SIGNATURE-----