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"]
|
||||
sequence_ [tell [", &", c] | c <- chans]
|
||||
tell [");\n\
|
||||
\\n\
|
||||
\ bool b = true;\n"]
|
||||
sequence_ [tell [" ChanOut (wptr, &", kc, ", &b, sizeof b);\n"]
|
||||
| kc <- killChans]
|
||||
\\n"]
|
||||
sequence_ [tell [" ", func, "_kill (wptr, &", kc, ");\n"]
|
||||
| (func, kc) <- zip funcs killChans]
|
||||
|
||||
tell [" LightProcBarrierWait (wptr, &bar);\n\
|
||||
\\n\
|
||||
\ Shutdown (wptr);\n\
|
||||
\}\n\
|
||||
\\n\
|
||||
|
|
|
@ -53,6 +53,11 @@ static void tock_tlp_input (Workspace wptr) {
|
|||
// 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) {
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user