X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmisc%2Fbochs-2.2.6-jitter.patch;h=48917e06b1a638f7b424938753302f22d0a6dfd3;hb=eae29259cd81d3d2e1426eb9a3f9c47eb06d0a88;hp=ad7ccb9b25661da1438e428c38e70345b70dd70b;hpb=37b944e33b4be2ab3baabfe24e6cf71c70b2a1cd;p=pintos-anon diff --git a/src/misc/bochs-2.2.6-jitter.patch b/src/misc/bochs-2.2.6-jitter.patch index ad7ccb9..48917e0 100644 --- a/src/misc/bochs-2.2.6-jitter.patch +++ b/src/misc/bochs-2.2.6-jitter.patch @@ -15,7 +15,7 @@ diff -urp bochs-2.2.6/iodev/pit82c54.cc bochs-2.2.6.orig/iodev/pit82c54.cc if(thisctr.triggerGATE || thisctr.first_pass) { - set_count(thisctr, thisctr.inlatch); + unsigned n = thisctr.inlatch; -+ if (jitter) { ++ if (jitter && n > 5) { + n *= (double) rand() / RAND_MAX; + if (n < 5) + n = 5; @@ -49,3 +49,13 @@ diff -urp bochs-2.2.6/main.cc bochs-2.2.6.orig/main.cc else if (!strcmp ("-f", argv[arg])) { if (++arg >= argc) BX_PANIC(("-f must be followed by a filename")); else bochsrc_filename = argv[arg]; +diff -up /home/blp/cs140/bochs-2.2.6/bochs.h\~ /home/blp/cs140/bochs-2.2.6/bochs.h +--- bochs-2.2.6/bochs.h.orig 2006-01-28 08:16:02.000000000 -0800 ++++ bochs-2.2.6/bochs.h 2006-04-03 14:03:54.000000000 -0700 +@@ -698,4 +698,6 @@ int bx_init_hardware (); + + #endif + ++extern int jitter; ++ + #endif /* BX_BOCHS_H */