Ignore:
Timestamp:
Nov 26, 2002, 10:24:54 PM (23 years ago)
Author:
bird
Message:

Import of RELENG_4_7_0_RELEASE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/FREEBSD/src/kmk/job.h

    r10 r24  
    11/*
    2  * Copyright (c) 1988, 1989, 1990, 1993
    3  *      The Regents of the University of California.  All rights reserved.
     2 * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
    43 * Copyright (c) 1988, 1989 by Adam de Boor
    54 * Copyright (c) 1989 by Berkeley Softworks
     
    3736 * SUCH DAMAGE.
    3837 *
    39  *      @(#)job.h       8.1 (Berkeley) 6/6/93
    40  * $FreeBSD: src/usr.bin/make/job.h,v 1.20 2002/10/09 01:56:02 jmallett Exp $
     38 *      from: @(#)job.h 8.1 (Berkeley) 6/6/93
     39 * $FreeBSD: src/usr.bin/make/job.h,v 1.11 2000/01/17 06:43:41 kris Exp $
    4140 */
    4241
     
    4746 */
    4847#ifndef _JOB_H_
    49 #define _JOB_H_
    50 
    51 #define TMPPAT  "/tmp/makeXXXXXXXXXX"
    52 
    53 #ifndef USE_KQUEUE
     48#define _JOB_H_
     49
     50#define TMPPAT  "/tmp/makeXXXXXXXXXX"
     51
    5452/*
    5553 * The SEL_ constants determine the maximum amount of time spent in select
     
    5755 * seconds and SEL_USEC is the number of micro-seconds
    5856 */
    59 #define SEL_SEC         0
    60 #define SEL_USEC        100000
    61 #endif /* !USE_KQUEUE */
     57#define SEL_SEC         0
     58#define SEL_USEC        100000
    6259
    6360
     
    7067 *      2) The graph node describing the target being made by this job
    7168 *      3) A LstNode for the first command to be saved after the job
    72  *         completes. This is NULL if there was no "..." in the job's
     69 *         completes. This is NILLNODE if there was no "..." in the job's
    7370 *         commands.
    7471 *      4) An FILE* for writing out the commands. This is only
     
    9592 * traversal of the dependency graph.
    9693 */
    97 #define JOB_BUFSIZE     1024
     94#define JOB_BUFSIZE     1024
    9895typedef struct Job {
    9996    int         pid;        /* The child's process ID */
     
    109106#define JOB_IGNERR      0x001   /* Ignore non-zero exits */
    110107#define JOB_SILENT      0x002   /* no output */
    111 #define JOB_SPECIAL     0x004   /* Target is a special one. i.e. run it locally
     108#define JOB_SPECIAL     0x004   /* Target is a special one. i.e. run it locally
    112109                                 * if we can't export it and maxLocal is 0 */
    113 #define JOB_IGNDOTS     0x008   /* Ignore "..." lines when processing
     110#define JOB_IGNDOTS     0x008   /* Ignore "..." lines when processing
    114111                                 * commands */
    115 #define JOB_REMOTE      0x010   /* Job is running remotely */
    116 #define JOB_FIRST       0x020   /* Job is first job for the node */
    117 #define JOB_REMIGRATE   0x040   /* Job needs to be remigrated */
    118 #define JOB_RESTART     0x080   /* Job needs to be completely restarted */
    119 #define JOB_RESUME      0x100   /* Job needs to be resumed b/c it stopped,
     112#define JOB_REMOTE      0x010   /* Job is running remotely */
     113#define JOB_FIRST       0x020   /* Job is first job for the node */
     114#define JOB_REMIGRATE   0x040   /* Job needs to be remigrated */
     115#define JOB_RESTART     0x080   /* Job needs to be completely restarted */
     116#define JOB_RESUME      0x100   /* Job needs to be resumed b/c it stopped,
    120117                                 * for some reason */
    121 #define JOB_CONTINUING  0x200   /* We are in the process of resuming this job.
     118#define JOB_CONTINUING  0x200   /* We are in the process of resuming this job.
    122119                                 * Used to avoid infinite recursion between
    123120                                 * JobFinish and JobRestart */
     
    148145} Job;
    149146
    150 #define outPipe         output.o_pipe.op_outPipe
    151 #define inPipe          output.o_pipe.op_inPipe
    152 #define outBuf          output.o_pipe.op_outBuf
    153 #define curPos          output.o_pipe.op_curPos
    154 #define outFile         output.o_file.of_outFile
    155 #define outFd           output.o_file.of_outFd
     147#define outPipe         output.o_pipe.op_outPipe
     148#define inPipe          output.o_pipe.op_inPipe
     149#define outBuf          output.o_pipe.op_outBuf
     150#define curPos          output.o_pipe.op_curPos
     151#define outFile         output.o_file.of_outFile
     152#define outFd           output.o_file.of_outFd
    156153
    157154
     
    208205}               Shell;
    209206
    210 /*
    211  * If REMOTE is defined then these things need exposed, otherwise they are
    212  * static to job.c!
    213  */
    214 #ifdef REMOTE
     207
    215208extern char     *targFmt;       /* Format string for banner that separates
    216209                                 * output from multiple jobs. Contains a
     
    227220                                 * quite get started */
    228221extern Boolean  jobFull;        /* Non-zero if no more jobs should/will start*/
    229 #endif
    230 
    231 extern int      maxJobs;        /* Number of jobs that may run */
    232 
    233 
    234 void Job_Touch(GNode *, Boolean);
    235 Boolean Job_CheckCommands(GNode *, void (*abortProc)(const char *, ...));
    236 void Job_CatchChildren(Boolean);
    237 void Job_CatchOutput(void);
    238 void Job_Make(GNode *);
    239 void Job_Init(int, int);
    240 Boolean Job_Full(void);
    241 Boolean Job_Empty(void);
    242 ReturnStatus Job_ParseShell(char *);
    243 int Job_Finish(void);
    244 void Job_Wait(void);
    245 void Job_AbortAll(void);
    246 void JobFlagForMigration(int);
     222
     223
     224void Job_Touch __P((GNode *, Boolean));
     225Boolean Job_CheckCommands __P((GNode *, void (*abortProc )(char *, ...)));
     226void Job_CatchChildren __P((Boolean));
     227void Job_CatchOutput __P((void));
     228void Job_Make __P((GNode *));
     229void Job_Init __P((int, int));
     230Boolean Job_Full __P((void));
     231Boolean Job_Empty __P((void));
     232ReturnStatus Job_ParseShell __P((char *));
     233int Job_End __P((void));
     234void Job_Wait __P((void));
     235void Job_AbortAll __P((void));
     236void JobFlagForMigration __P((int));
    247237
    248238#endif /* _JOB_H_ */
Note: See TracChangeset for help on using the changeset viewer.