1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-16 08:10:43 -08:00

Adding mutatorfaultcontext parm to arenaaccess

Copied from Perforce
 Change: 19425
 ServerID: perforce.ravenbrook.com
This commit is contained in:
David Jones 1998-04-17 15:12:14 +01:00
parent efa0d9bb3f
commit e02ea12075
5 changed files with 21 additions and 14 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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 <unistd.h>
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;
}

View file

@ -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;
}

View file

@ -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 <sys/mman.h>
#include <signal.h>
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;
}