From ea707da154229ae09a13ce7772ed60bd24e26ed7 Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Tue, 11 Nov 2008 16:22:26 +0000 Subject: [PATCH] Mps br/timing: mpsi_check(): check that external and internal messsage types match. Copied from Perforce Change: 166696 ServerID: perforce.ravenbrook.com --- mps/code/mpsi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mps/code/mpsi.c b/mps/code/mpsi.c index e5f88fc8541..f27d1b7dec5 100644 --- a/mps/code/mpsi.c +++ b/mps/code/mpsi.c @@ -91,6 +91,18 @@ static Bool mpsi_check(void) CHECKL((int)MPS_RANK_EXACT == (int)RankEXACT); CHECKL((int)MPS_RANK_WEAK == (int)RankWEAK); + /* Check that external and internal messsage types match. */ + /* See and */ + /* . */ + /* Also see .check.enum.cast. */ + CHECKL(CHECKTYPE(mps_message_type_t, MessageType)); + CHECKL((int)MessageTypeFINALIZATION + == (int)MPS_MESSAGE_TYPE_FINALIZATION); + CHECKL((int)MessageTypeGC + == (int)MPS_MESSAGE_TYPE_GC); + CHECKL((int)MessageTypeGCSTART + == (int)MPS_MESSAGE_TYPE_GC_START); + /* The external idea of a word width and the internal one */ /* had better match. See . */ CHECKL(sizeof(mps_word_t) == sizeof(void *));