Abstract killing TLP channel handlers out into a function.
This commit is contained in:
parent
8880413128
commit
f2d3280cee
|
@ -182,12 +182,12 @@ cgenTopLevel s
|
||||||
tell [" (wptr"]
|
tell [" (wptr"]
|
||||||
sequence_ [tell [", &", c] | c <- chans]
|
sequence_ [tell [", &", c] | c <- chans]
|
||||||
tell [");\n\
|
tell [");\n\
|
||||||
\\n\
|
\\n"]
|
||||||
\ bool b = true;\n"]
|
sequence_ [tell [" ", func, "_kill (wptr, &", kc, ");\n"]
|
||||||
sequence_ [tell [" ChanOut (wptr, &", kc, ", &b, sizeof b);\n"]
|
| (func, kc) <- zip funcs killChans]
|
||||||
| kc <- killChans]
|
|
||||||
|
|
||||||
tell [" LightProcBarrierWait (wptr, &bar);\n\
|
tell [" LightProcBarrierWait (wptr, &bar);\n\
|
||||||
|
\\n\
|
||||||
\ Shutdown (wptr);\n\
|
\ Shutdown (wptr);\n\
|
||||||
\}\n\
|
\}\n\
|
||||||
\\n\
|
\\n\
|
||||||
|
|
|
@ -53,6 +53,11 @@ static void tock_tlp_input (Workspace wptr) {
|
||||||
// FIXME: Implement using killable BSC
|
// FIXME: Implement using killable BSC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void tock_tlp_input_kill (Workspace wptr, Channel *kill) occam_unused;
|
||||||
|
static void tock_tlp_input_kill (Workspace wptr, Channel *kill) {
|
||||||
|
// FIXME: Implement
|
||||||
|
}
|
||||||
|
|
||||||
static void tock_tlp_output (Workspace wptr) occam_unused;
|
static void tock_tlp_output (Workspace wptr) occam_unused;
|
||||||
static void tock_tlp_output (Workspace wptr) {
|
static void tock_tlp_output (Workspace wptr) {
|
||||||
Channel *in = ProcGetParam (wptr, 0, Channel *);
|
Channel *in = ProcGetParam (wptr, 0, Channel *);
|
||||||
|
@ -77,6 +82,13 @@ static void tock_tlp_output (Workspace wptr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void tock_tlp_output_kill (Workspace wptr, Channel *kill) occam_unused;
|
||||||
|
static void tock_tlp_output_kill (Workspace wptr, Channel *kill) {
|
||||||
|
bool b = true;
|
||||||
|
|
||||||
|
ChanOut (wptr, kill, &b, sizeof b);
|
||||||
|
}
|
||||||
//}}}
|
//}}}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user