Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Bill Sommerfeld <sommerfeld@netbsd.org>
List: source-changes
Date: 12/30/2000 04:05:21
Module Name: basesrc
Committed By: sommerfeld
Date: Sat Dec 30 02:05:21 UTC 2000
Modified Files:
basesrc/usr.bin/make: Makefile job.c job.h main.c make.1 make.c make.h
Log Message:
Add a token-passing scheme to allow a recursive make to successfully
use -j; all make's in a recursive build cooperate to limit the total
number of jobs, using a token-passing scheme.
The current token passing algorithm is similar to the one implemented
by gmake; there is a single pipe which is inherited through the entire
process hierarchy; tokens are obtained by reading a byte from the
"read end" of the pipe, and are returned by writing them to the "write
end". This exact algorithm is likely to change in the future.
Implementation details:
- Use the new trace facility to allow measurement of the
effectiveness of different token-passing schemes
- Get a token in MakeStartJobs(), return it in Make_Update()
- Eliminate Job_Full() and the jobFull global since they are
redundant with token system.
- Add an "internal" -J option (to pass the token pipe fd's down to
submakes) and a -T option for tracing.
- Change how compatMake is forced so that -j means something when
inherited by submakes.
- When waiting for a token, poll the token-passing pipe as well as
the output pipes of existing jobs.
To generate a diff of this commit:
cvs rdiff -r1.21 -r1.22 basesrc/usr.bin/make/Makefile
cvs rdiff -r1.39 -r1.40 basesrc/usr.bin/make/job.c
cvs rdiff -r1.10 -r1.11 basesrc/usr.bin/make/job.h
cvs rdiff -r1.57 -r1.58 basesrc/usr.bin/make/main.c
cvs rdiff -r1.43 -r1.44 basesrc/usr.bin/make/make.1
cvs rdiff -r1.31 -r1.32 basesrc/usr.bin/make/make.c
cvs rdiff -r1.29 -r1.30 basesrc/usr.bin/make/make.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.