0
0
Fork 0
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:
Jason Volk 2018-04-19 23:19:11 -07:00
parent 2a7cb42c98
commit 885e46788b

View file

@ -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)
{ {