diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2009-05-10 11:07:38 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2009-05-10 11:07:38 +0000 |
commit | a4ea259d44c533c072826ae51be0abe39d6fdb6a (patch) | |
tree | b297f9694662a84c4b90fe496c11ecb27776a299 /usr.bin/make/engine.h | |
parent | 89e3020434ff7230adcca1c6dcb1a83aecfbcfdb (diff) |
simplify job handling a great deal: we don't care when jobs get
stopped/continued, as we won't try to start new jobs when other stuff
is stopped.
Redo signal handling so that most stuff can be done directly in the handler.
This requires blocking/unblocking signals while creating new jobs, and creating
a small list that only contains job's pids.
Switch to pgrps for jobs, since that works.
Add a clamping heuristic that avoids starting new jobs while an expensive job
is running (expensive meaning "very likely to be a recursive make run"). This
idea is mostly from Theo, through the implementation is mine.
Diffstat (limited to 'usr.bin/make/engine.h')
-rw-r--r-- | usr.bin/make/engine.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/make/engine.h b/usr.bin/make/engine.h index 01be736e7b0..d6e3e7da241 100644 --- a/usr.bin/make/engine.h +++ b/usr.bin/make/engine.h @@ -1,6 +1,6 @@ #ifndef ENGINE_H #define ENGINE_H -/* $OpenBSD: engine.h,v 1.7 2009/04/26 09:25:49 espie Exp $ */ +/* $OpenBSD: engine.h,v 1.8 2009/05/10 11:07:37 espie Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -69,13 +69,16 @@ extern void Make_DoAllVar(GNode *); extern volatile sig_atomic_t got_signal; extern volatile sig_atomic_t got_SIGINT, got_SIGHUP, got_SIGQUIT, - got_SIGTERM, got_SIGTSTP, got_SIGTTOU, got_SIGTTIN, got_SIGWINCH; + got_SIGTERM, got_SIGTSTP, got_SIGTTOU, got_SIGTTIN, got_SIGWINCH, + got_SIGCONT; extern void SigHandler(int); extern int run_gnode(GNode *); extern void run_gnode_parallel(GNode *); extern void expand_commands(GNode *); -extern void setup_engine(void); +extern void setup_engine(int); +typedef void (*psighandler)(int); +extern void setup_all_signals(psighandler, psighandler); #endif |