Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

sighandler_platform.c

Go to the documentation of this file.
00001 
00010 #include "sigsafe_internal.h"
00011 #include <ucontext.h>
00012 #include <unistd.h>
00013 
00014 void sigsafe_handler_for_platform_(ucontext_t *ctx) {
00015     struct sigsafe_syscall_ *s;
00016     void *pc;
00017     pc = (void*) ctx->uc_mcontext.sc_pc;
00018     for (s = sigsafe_syscalls_; s->minjmp != NULL; s++) {
00019         if (s->minjmp <= pc && pc <= s->maxjmp) {
00020 #ifdef SIGSAFE_DEBUG_JUMP
00021             write(2, "[J]", 3);
00022 #endif
00023             ctx->uc_mcontext.sc_pc = (long) s->jmpto;
00024             return;
00025         }
00026     }
00027 }

Generated on Fri Feb 4 11:13:32 2005 for sigsafe by doxygen 1.3.5