/*
* C support for Signals in Mesa/Cedar.
* Copyright Ó 1989 by Xerox Corporation. All rights reserved.
*/
#include "SignalSupport.h"
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
unsigned XR←UnnamedSignal;
unsigned XR←UnnamedError;
unsigned XR←Unwind;
unsigned XRorted;
unsigned XR←Uncaught;
unsigned XR←NarrowFault;
unsigned XR←NarrowRefFault;
unsigned XR←InvalidProcess;
SignalEnvironment XR←SigEnv;
void XR←SetSignalEnvironment(env)
SignalEnvironment env;
{
XR←SigEnv = env;
XR←UnnamedError = env-> unnamedError;
XR←UnnamedSignal = env->unnamedSignal;
XR←Unwind = env->Unwind;
XRorted = env->aborted;
XR←Uncaught = env->uncaught;
XR←NarrowFault = env->narrowFault;
XR←NarrowRefFault = env->narrowRefFault;
XR←InvalidProcess = env->invalidProcess;
/* XR←RegisterHandler(ThreadHandler); */
};
/*
* Replacement for ←setjmp used in PushHandler; the idea is that later
* we'll want to go back to PushHandler's caller, not to PushHandler.
*
* This must remain consistent with XR←setjmp in PCR (Threads.h),
* preferably by using it.
*
*/
#if defined(sparc)
asm(" .text");
asm(" .globl ←XR←UplevelSetjmp");
asm("←XR←UplevelSetjmp:");
asm(" mov %o0,%g1"); /* save arg */
asm(" restore"); /* up 1 level */
asm(" mov %g1,%o0"); /* restore arg */
asm(" sethi %hi(←XR←setjmp),%g1"); /* prepare for jump */
asm(" jmpl %g1+%lo(←XR←setjmp),%g0");
asm(" nop");
#endif