Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make For parallel makes, don't recycle the job token...
details: https://anonhg.NetBSD.org/src/rev/0fceb2716d59
branches: trunk
changeset: 586888:0fceb2716d59
user: dsl <dsl%NetBSD.org@localhost>
date: Wed Jan 04 21:16:53 2006 +0000
description:
For parallel makes, don't recycle the job token when we decide not to
run anything.
diffstat:
usr.bin/make/make.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (70 lines):
diff -r a98cadf9e561 -r 0fceb2716d59 usr.bin/make/make.c
--- a/usr.bin/make/make.c Wed Jan 04 21:10:09 2006 +0000
+++ b/usr.bin/make/make.c Wed Jan 04 21:16:53 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.c,v 1.58 2005/08/08 16:42:54 christos Exp $ */
+/* $NetBSD: make.c,v 1.59 2006/01/04 21:16:53 dsl Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: make.c,v 1.58 2005/08/08 16:42:54 christos Exp $";
+static char rcsid[] = "$NetBSD: make.c,v 1.59 2006/01/04 21:16:53 dsl Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: make.c,v 1.58 2005/08/08 16:42:54 christos Exp $");
+__RCSID("$NetBSD: make.c,v 1.59 2006/01/04 21:16:53 dsl Exp $");
#endif
#endif /* not lint */
#endif
@@ -931,6 +931,7 @@
MakeStartJobs(void)
{
GNode *gn;
+ int have_token = 0;
while (!Lst_IsEmpty (toBeMade)) {
gn = (GNode *)Lst_DeQueue(toBeMade);
@@ -966,10 +967,11 @@
}
}
- if (!Job_TokenWithdraw()) {
+ if (!have_token && !Job_TokenWithdraw()) {
Lst_AtFront(toBeMade, gn);
break;
}
+ have_token = 1;
numNodes--;
if (Make_OODate(gn)) {
@@ -981,6 +983,7 @@
}
Make_DoAllVar(gn);
Job_Make(gn);
+ have_token = 0;
} else {
if (DEBUG(MAKE)) {
printf("up-to-date\n");
@@ -995,10 +998,13 @@
*/
Make_DoAllVar(gn);
}
- Job_TokenReturn();
Make_Update(gn);
}
}
+
+ if (have_token)
+ Job_TokenReturn();
+
return (FALSE);
}
Home |
Main Index |
Thread Index |
Old Index