feat: implement kernel capability model
This commit is contained in:
@@ -31,6 +31,11 @@ namespace montauk::abi {
|
||||
// action; any other value records it as the pending action. Returns the
|
||||
// pending action for queries, or 0 when recording one.
|
||||
static int64_t Sys_PowerRequest(int action) {
|
||||
// Polled by the session leader every second; deliberately silent and
|
||||
// non-destructive, so it neither floods the log nor races login for
|
||||
// the request it is about to hand over by exiting.
|
||||
if (action == POWER_REQ_PEEK) return (int64_t)g_pendingPowerAction;
|
||||
|
||||
if (action == POWER_REQ_QUERY) {
|
||||
int pending = g_pendingPowerAction;
|
||||
g_pendingPowerAction = POWER_REQ_QUERY;
|
||||
|
||||
Reference in New Issue
Block a user