mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
modules/console: Add ctx interrupt cmd.
This commit is contained in:
parent
2a7cb42c98
commit
885e46788b
1 changed files with 23 additions and 0 deletions
|
@ -519,6 +519,29 @@ console_cmd__mod__unload(opt &out, const string_view &line)
|
||||||
// ctx
|
// ctx
|
||||||
//
|
//
|
||||||
|
|
||||||
|
bool
|
||||||
|
console_cmd__ctx__interrupt(opt &out, const string_view &line)
|
||||||
|
{
|
||||||
|
const params param{line, " ",
|
||||||
|
{
|
||||||
|
"id",
|
||||||
|
}};
|
||||||
|
|
||||||
|
const uint64_t ctxid
|
||||||
|
{
|
||||||
|
param.at<uint64_t>(0)
|
||||||
|
};
|
||||||
|
|
||||||
|
for(auto *const &ctx : ctx::ctxs)
|
||||||
|
if(id(*ctx) == ctxid)
|
||||||
|
{
|
||||||
|
interrupt(*ctx);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
console_cmd__ctx__list(opt &out, const string_view &line)
|
console_cmd__ctx__list(opt &out, const string_view &line)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue