[581] | 1 | divert(-1) |
---|
| 2 | define(NEWPROC,) dnl |
---|
| 3 | |
---|
| 4 | define(BARRIER, `{;}') |
---|
| 5 | define(BARDEC, `long ($1);') |
---|
| 6 | define(BARINIT, `{;}') |
---|
| 7 | |
---|
| 8 | define(BAREXCLUDE, `{;}') |
---|
| 9 | |
---|
| 10 | define(BARINCLUDE, `{;}') |
---|
| 11 | |
---|
| 12 | define(GSDEC, `long ($1);') |
---|
| 13 | define(GSINIT, `{ ($1) = 0; }') |
---|
| 14 | define(GETSUB, `{ |
---|
| 15 | if (($1)<=($3)) |
---|
| 16 | ($2) = ($1)++; |
---|
| 17 | else { |
---|
| 18 | ($2) = -1; |
---|
| 19 | ($1) = 0; |
---|
| 20 | } |
---|
| 21 | }') |
---|
| 22 | |
---|
| 23 | define(NU_GSDEC, `long ($1);') |
---|
| 24 | define(NU_GSINIT, `{ ($1) = 0; }') |
---|
| 25 | define(NU_GETSUB, `GETSUB($1,$2,$3,$4)') |
---|
| 26 | |
---|
| 27 | define(ADEC, `long ($1);') |
---|
| 28 | define(AINIT, `{;}') |
---|
| 29 | define(PROBEND, `{;}') |
---|
| 30 | |
---|
| 31 | define(LOCKDEC, `long ($1);') |
---|
| 32 | define(LOCKINIT, `{;}') |
---|
| 33 | define(LOCK, `{;}') |
---|
| 34 | define(UNLOCK, `{;}') |
---|
| 35 | |
---|
| 36 | define(NLOCKDEC, `long ($1);') |
---|
| 37 | define(NLOCKINIT, `{;}') |
---|
| 38 | define(NLOCK, `{;}') |
---|
| 39 | define(NUNLOCK, `{;}') |
---|
| 40 | |
---|
| 41 | define(ALOCKDEC, `long ($1);') |
---|
| 42 | define(ALOCKINIT, `{;}') |
---|
| 43 | define(ALOCK, `{;}') |
---|
| 44 | define(AULOCK, `{;}') |
---|
| 45 | |
---|
| 46 | define(PAUSEDEC, ` ') |
---|
| 47 | define(PAUSEINIT, `{;}') |
---|
| 48 | define(CLEARPAUSE, `{;}') |
---|
| 49 | define(SETPAUSE, `{;}') |
---|
| 50 | define(EVENT, `{;}') |
---|
| 51 | define(WAITPAUSE, `{;}') |
---|
| 52 | define(PAUSE, `{;}') |
---|
| 53 | |
---|
| 54 | define(AUG_ON, ` ') |
---|
| 55 | define(AUG_OFF, ` ') |
---|
| 56 | define(TRACE_ON, ` ') |
---|
| 57 | define(TRACE_OFF, ` ') |
---|
| 58 | define(REF_TRACE_ON, ` ') |
---|
| 59 | define(REF_TRACE_OFF, ` ') |
---|
| 60 | define(DYN_TRACE_ON, `;') |
---|
| 61 | define(DYN_TRACE_OFF, `;') |
---|
| 62 | define(DYN_REF_TRACE_ON, `;') |
---|
| 63 | define(DYN_REF_TRACE_OFF, `;') |
---|
| 64 | define(DYN_SIM_ON, `;') |
---|
| 65 | define(DYN_SIM_OFF, `;') |
---|
| 66 | define(DYN_SCHED_ON, `;') |
---|
| 67 | define(DYN_SCHED_OFF, `;') |
---|
| 68 | define(AUG_SET_LOLIMIT, `;') |
---|
| 69 | define(AUG_SET_HILIMIT, `;') |
---|
| 70 | |
---|
| 71 | define(MENTER, `{;}') |
---|
| 72 | define(DELAY, `{;}') |
---|
| 73 | define(CONTINUE, `{;}') |
---|
| 74 | define(MEXIT, `{;}') |
---|
| 75 | define(MONINIT, `{;}') |
---|
| 76 | |
---|
| 77 | define(WAIT_FOR_END, `{;}') |
---|
| 78 | |
---|
| 79 | define(CREATE, `{fprintf(stderr, "No more processors -- this is a uniprocessor version!\n"); exit(-1);}') |
---|
| 80 | define(MAIN_INITENV, `{;}') |
---|
| 81 | define(MAIN_END, `{exit(0);}') |
---|
| 82 | define(MAIN_ENV,` ') |
---|
| 83 | define(ENV, ` ') |
---|
| 84 | define(EXTERN_ENV, ` ') |
---|
| 85 | |
---|
| 86 | define(G_MALLOC, `malloc($1);') |
---|
| 87 | define(G_FREE, `;') |
---|
| 88 | define(G_MALLOC_F, `malloc($1)') |
---|
| 89 | define(NU_MALLOC, `malloc($1);') |
---|
| 90 | define(NU_FREE, `;') |
---|
| 91 | define(NU_MALLOC_F, `malloc($1)') |
---|
| 92 | |
---|
| 93 | define(GET_HOME, `{($1) = 0;}') |
---|
| 94 | define(GET_PID, `{($1) = 0;}') |
---|
| 95 | define(AUG_DELAY, `{sleep ($1);}') |
---|
| 96 | define(ST_LOG, `{;}') |
---|
| 97 | define(SET_HOME, `{;}') |
---|
| 98 | define(CLOCK, `{long time(); ($1) = time(0);}') |
---|
| 99 | divert(0) |
---|