summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/job.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-11-12 08:58:07 +0000
committerphk <phk@FreeBSD.org>2004-11-12 08:58:07 +0000
commiteb0fa827fcfd13a6fb449fdc5fe1a3c114b2f0a0 (patch)
tree8b295cb4fe4d748e59a9ca3dbb4896739065fcbd /usr.bin/make/job.h
parent24fe3160f6855d1e448487cea73895c8f79a7edd (diff)
downloadFreeBSD-src-eb0fa827fcfd13a6fb449fdc5fe1a3c114b2f0a0.zip
FreeBSD-src-eb0fa827fcfd13a6fb449fdc5fe1a3c114b2f0a0.tar.gz
Add code to enforce the paralleism count (-j N) for the entire tree
of submakes spawned during processing. We create a fifo and stuff one character into it for each job we are allowed to run. The name of the fifo is passed to child processes in the MAKE_JOBS_FIFO environment variable. A make which finds this variable on startup will open the fifo and only spawn jobs when it managed to read a token from the fifo. When the job completes a token is writen back to the fifo. Slave make processes get one token for free: the one their parent make got in order to run them. This makes the make processes themselves invisible in the process counts. The net effect is that "make -j 12 -s buildworld" will start at most 12 jobs at the same time, instead of as previously up to 65 jobs would get started.
Diffstat (limited to 'usr.bin/make/job.h')
-rw-r--r--usr.bin/make/job.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/make/job.h b/usr.bin/make/job.h
index 09fe8fe..25aa511 100644
--- a/usr.bin/make/job.h
+++ b/usr.bin/make/job.h
@@ -209,7 +209,7 @@ void Shell_Init(void);
void Job_Touch(GNode *, Boolean);
Boolean Job_CheckCommands(GNode *, void (*abortProc)(const char *, ...));
void Job_CatchChildren(Boolean);
-void Job_CatchOutput(void);
+void Job_CatchOutput(int flag);
void Job_Make(GNode *);
void Job_Init(int);
Boolean Job_Full(void);
OpenPOWER on IntegriCloud