projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8db56c8
)
fix boundary bugs in a couple of for-loops
author
simonmar@microsoft.com
<unknown>
Tue, 20 Nov 2007 13:38:35 +0000
(13:38 +0000)
committer
simonmar@microsoft.com
<unknown>
Tue, 20 Nov 2007 13:38:35 +0000
(13:38 +0000)
rts/sm/Scav.c
patch
|
blob
|
history
diff --git
a/rts/sm/Scav.c
b/rts/sm/Scav.c
index
17e519d
..
3f68efb
100644
(file)
--- a/
rts/sm/Scav.c
+++ b/
rts/sm/Scav.c
@@
-1409,8
+1409,8
@@
scavenge_find_global_work (void)
step_workspace *ws;
flag = rtsFalse;
step_workspace *ws;
flag = rtsFalse;
- for (g = RtsFlags.GcFlags.generations; --g >= 0; ) {
- for (s = generations[g].n_steps; --s >= 0; ) {
+ for (g = RtsFlags.GcFlags.generations-1; g >= 0; g--) {
+ for (s = generations[g].n_steps-1; s >= 0; s--) {
if (g == 0 && s == 0 && RtsFlags.GcFlags.generations > 1) {
continue;
}
if (g == 0 && s == 0 && RtsFlags.GcFlags.generations > 1) {
continue;
}
@@
-1568,8
+1568,8
@@
any_work (void)
// Check for global work in any step. We don't need to check for
// local work, because we have already exited scavenge_loop(),
// which means there is no local work for this thread.
// Check for global work in any step. We don't need to check for
// local work, because we have already exited scavenge_loop(),
// which means there is no local work for this thread.
- for (g = RtsFlags.GcFlags.generations; --g >= 0; ) {
- for (s = generations[g].n_steps; --s >= 0; ) {
+ for (g = RtsFlags.GcFlags.generations-1; g >= 0; g--) {
+ for (s = generations[g].n_steps-1; s >= 0; s--) {
if (g == 0 && s == 0 && RtsFlags.GcFlags.generations > 1) {
continue;
}
if (g == 0 && s == 0 && RtsFlags.GcFlags.generations > 1) {
continue;
}