seL4/include/kernel/faulthandler.h
Michael McInerney 019e4b608f mcs: small changes to ease verification
Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
2025-03-21 16:48:00 +11:00

26 lines
645 B
C

/*
* Copyright 2014, General Dynamics C4 Systems
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include <object.h>
#ifdef CONFIG_KERNEL_MCS
static inline bool_t validTimeoutHandler(tcb_t *tptr)
{
cap_t timeoutHandlerCap = TCB_PTR_CTE_PTR(tptr, tcbTimeoutHandler)->cap;
return cap_get_capType(timeoutHandlerCap) == cap_endpoint_cap;
}
void handleTimeout(tcb_t *tptr);
void handleNoFaultHandler(tcb_t *tptr);
bool_t sendFaultIPC(tcb_t *tptr, cap_t handlerCap, bool_t can_donate);
#else
exception_t sendFaultIPC(tcb_t *tptr);
void handleDoubleFault(tcb_t *tptr, seL4_Fault_t ex1);
#endif
void handleFault(tcb_t *tptr);