source: soft/giet_vm/applications/ocean/null_macros/c.m4.null @ 792

Last change on this file since 792 was 581, checked in by laurent, 9 years ago

Adding ocean application, some mathematics functions and distributed locks

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