0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-13 08:23:56 +01:00

ircd::gpt::pipe: Move the frame mapping command to the cycle.

This commit is contained in:
Jason Volk 2022-10-05 17:40:26 +00:00
parent 33afa8a4fc
commit a9709568b4
3 changed files with 9 additions and 7 deletions

View file

@ -31,7 +31,7 @@ struct ircd::gpt::pipe::cycle
static constexpr size_t stages
{
4 + 3 + (12 * 2) + 4 + 2 + (12 * 2) + 1
4 + 3 + (12 * 2) + 4 + 2 + (12 * 2) + 1 + 1
};
pipe::desc &desc;

View file

@ -937,11 +937,6 @@ ircd::gpt::samp::tokenize()
bool
ircd::gpt::samp::evaluate(pipe::cycle &cycle)
{
cl::exec
{
desc.frame[cycle.frame], std::memory_order_consume
};
const auto &frame
{
acquire(cycle)

View file

@ -179,15 +179,18 @@ ircd::gpt::pipe::acquire(cycle &cycle)
return work.handle;
})
};
assert(last_exec != std::rend(cycle.stage));
// Block here for results; the ircd::ctx will yield.
last_exec->wait();
// Get the pointer to the output buffer.
const auto ctrl
{
reinterpret_cast<const gpt::ctrl *>(cycle.desc.frame[cycle.frame].ptr())
};
// Check the output is a valid control page and return to user.
assert(ctrl);
assert(ctrl->magic != 0xDEADBEEF);
assert(ctrl->magic == 0xC7012C70UL);
@ -340,6 +343,10 @@ ircd::gpt::pipe::cycle::cycle(gpt::samp &samp)
{
desc.leave[frame], range.select
},
cl::exec // Frame out
{
desc.frame[frame], std::memory_order_consume
},
}
{
}