From e02ea12075ef61227ca2fd91a4091344bc074ca5 Mon Sep 17 00:00:00 2001 From: David Jones Date: Fri, 17 Apr 1998 15:12:14 +0100 Subject: [PATCH] Adding mutatorfaultcontext parm to arenaaccess Copied from Perforce Change: 19425 ServerID: perforce.ravenbrook.com --- mps/src/arena.c | 6 +++--- mps/src/mpm.h | 5 +++-- mps/src/proto1.c | 8 +++++--- mps/src/protso.c | 8 +++++--- mps/src/protsu.c | 8 +++++--- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/mps/src/arena.c b/mps/src/arena.c index 4dc86553fdc..7dfe243caff 100644 --- a/mps/src/arena.c +++ b/mps/src/arena.c @@ -1,6 +1,6 @@ /* impl.c.arena: ARENA IMPLEMENTATION * - * $HopeName$ + * $HopeName: MMsrc!arena.c(trunk.34) $ * Copyright (C) 1998. Harlequin Group plc. All rights reserved. * * .readership: Any MPS developer @@ -36,7 +36,7 @@ #include "poolmrg.h" #include "mps.h" -SRCID(arena, "$HopeName: MMsrc!arena.c(trunk.31) $"); +SRCID(arena, "$HopeName: MMsrc!arena.c(trunk.34) $"); /* All static data objects are declared here. See .static */ @@ -469,7 +469,7 @@ void ArenaLeave(Arena arena) * for the access to continue. */ -Bool ArenaAccess(Addr addr, AccessSet mode) +Bool ArenaAccess(Addr addr, AccessSet mode, MutatorFaultContext context) { Seg seg; Ring node, nextNode; diff --git a/mps/src/mpm.h b/mps/src/mpm.h index 8308b2aaf8e..f0adb7d1c52 100644 --- a/mps/src/mpm.h +++ b/mps/src/mpm.h @@ -1,6 +1,6 @@ /* impl.h.mpm: MEMORY POOL MANAGER DEFINITIONS * - * $HopeName$ + * $HopeName: MMsrc!mpm.h(trunk.81) $ * Copyright (C) 1998. Harlequin Group plc. All rights reserved. */ @@ -462,7 +462,8 @@ extern void ArenaDestroy(Arena arena); extern void ArenaInit(Arena arena, ArenaClass class); extern void ArenaFinish(Arena arena); extern Res ArenaDescribe(Arena arena, mps_lib_FILE *stream); -extern Bool ArenaAccess(Addr addr, AccessSet mode); +extern Bool ArenaAccess(Addr addr, AccessSet mode, + MutatorFaultContext context); extern void (ArenaEnter)(Arena arena); extern void (ArenaLeave)(Arena arena); diff --git a/mps/src/proto1.c b/mps/src/proto1.c index fc08d2c7fd6..12a39efe7ca 100644 --- a/mps/src/proto1.c +++ b/mps/src/proto1.c @@ -1,6 +1,6 @@ /* impl.c.proto1: PROTECTION FOR DIGITAL UNIX * - * $HopeName: MMsrc!proto1.c(trunk.1) $ + * $HopeName: MMsrc!proto1.c(trunk.2) $ * Copyright (C) 1995,1997 Harlequin Group, all rights reserved */ @@ -27,7 +27,7 @@ /* for getpid() */ #include -SRCID(proto1, "$HopeName: MMsrc!proto1.c(trunk.1) $"); +SRCID(proto1, "$HopeName: MMsrc!proto1.c(trunk.2) $"); /* The previously-installed signal action, as returned by */ @@ -79,7 +79,9 @@ static void sigHandle(int sig, siginfo_t *info, void *context) /* Offer each protection structure the opportunity to handle the */ /* exception. If it succeeds, then allow the mutator to continue. */ - if(ArenaAccess(base, mode)) + /* MutatorFaultContext parameter is a dummy parameter in this */ + /* implementation */ + if(ArenaAccess(base, mode, NULL)) return; } diff --git a/mps/src/protso.c b/mps/src/protso.c index 750faf294f2..192a61b3323 100644 --- a/mps/src/protso.c +++ b/mps/src/protso.c @@ -1,6 +1,6 @@ /* impl.c.protso: PROTECTION FOR SOLARIS * - * $HopeName: MMsrc!protso.c(MMdevel_config_thread.3) $ + * $HopeName: MMsrc!protso.c(trunk.5) $ * Copyright (C) 1995,1997 Harlequin Group, all rights reserved * */ @@ -29,7 +29,7 @@ #error "protso.c is Solaris specific, but MPS_OS_SO is not set" #endif -SRCID(protso, "$HopeName: MMsrc!protso.c(trunk.4) $"); +SRCID(protso, "$HopeName: MMsrc!protso.c(trunk.5) $"); /* Fix up unprototyped system calls. */ @@ -100,7 +100,9 @@ static void sigHandle(int sig, siginfo_t *info, void *context) /* Offer each protection structure the opportunity to handle the */ /* exception. If it succeeds, then allow the mutator to continue. */ - if(ArenaAccess(base, mode)) + /* MutatorFaultContext parameter is a dummy parameter for this */ + /* implementation */ + if(ArenaAccess(base, mode, NULL)) return; } diff --git a/mps/src/protsu.c b/mps/src/protsu.c index 92259a11e94..a271a90da3e 100644 --- a/mps/src/protsu.c +++ b/mps/src/protsu.c @@ -1,6 +1,6 @@ /* impl.c.protsu: PROTECTION FOR SUNOS * - * $HopeName: MMsrc!protsu.c(trunk.8) $ + * $HopeName: MMsrc!protsu.c(trunk.9) $ * Copyright (C) 1995,1996,1997 Harlequin Group, all rights reserved * * READERSHIP @@ -32,7 +32,7 @@ #include #include -SRCID(protsu, "$HopeName: MMsrc!protsu.c(trunk.8) $"); +SRCID(protsu, "$HopeName: MMsrc!protsu.c(trunk.9) $"); /* Fix up unprototyped system calls. */ @@ -105,7 +105,9 @@ static void sigHandle(int sig, int code, AccessSet mode; AVER(addr != SIG_NOADDR); /* .assume.addr */ mode = AccessREAD | AccessWRITE; /* .sigh.decode */ - if(ArenaAccess((Addr)addr, mode)) /* .sigh.size */ + /* MutatorFaultContext parameter is a dummy parameter in */ + /* this implementation */ + if(ArenaAccess((Addr)addr, mode, NULL)) /* .sigh.size */ return; }