[MG_Backend, MG_Remote, MG_Test] (Disaggregated): P5f fs - isolate context epochs and server liveness

This commit is contained in:
2026-09-19 23:44:03 -04:00
parent 4667e13be6
commit 12a9b13894
11 changed files with 405 additions and 4 deletions
+10 -1
View File
@@ -302,6 +302,15 @@ namespace MobileGL::MG_Pipe {
MGPipeStampAccess::SetServerStamped(MGPipeClientInputs(), false);
}
namespace { Bool g_serverContextLive = false; }
void MGPipeServerSetContextLive(Bool live) {
g_serverContextLive = live;
MGPipeServerBlockNoteIdentity();
}
Bool MGPipeServerContextIsLive() { return g_serverContextLive; }
void MGPipeServerBlockNoteIdentity() {
if (!MGPipeRoleSplitActive()) return;
// The server cannot name the client's GLContext - under a real transport it is in
@@ -313,7 +322,7 @@ namespace MobileGL::MG_Pipe {
// hands out a null slot - an unnamed crash where the rehearsal exists to produce a
// named one.
const Uint64 serial = MGPipeApplierContextSerial();
MGPipeStampAccess::SetIdentity(gPipeInputs, true,
MGPipeStampAccess::SetIdentity(gPipeInputs, g_serverContextLive,
reinterpret_cast<const void*>(static_cast<std::uintptr_t>(
(serial << 1) | Uint64{1})));
}
+4
View File
@@ -881,6 +881,10 @@ namespace MobileGL::MG_Pipe {
// unnamed crash where the rehearsal exists to produce a named one. A no-op with the
// rehearsal off, so the client's per-verb SetIdentity keeps owning the shared block there.
void MGPipeServerBlockNoteIdentity();
// P5f fs: owned by the server's control lifecycle, never inferred from a client
// GLContext or resurrected by stamping a verb after teardown.
void MGPipeServerSetContextLive(Bool live);
Bool MGPipeServerContextIsLive();
#else
// The push-without-transport build has one role and one block, so the fill side's spelling
// folds onto gPipeInputs and PipeFill.cpp reads identically in both build flavours. An