SmartAudio/lichee/linux-4.9/arch/x86/um/stub_segv.c

21 lines
455 B
C
Raw Normal View History

2018-07-13 01:31:50 +00:00
/*
* Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/
#include <sysdep/stub.h>
#include <sysdep/faultinfo.h>
#include <sysdep/mcontext.h>
2018-12-13 10:48:25 +00:00
#include <sys/ucontext.h>
2018-07-13 01:31:50 +00:00
void __attribute__ ((__section__ (".__syscall_stub")))
stub_segv_handler(int sig, siginfo_t *info, void *p)
{
2018-12-13 10:48:25 +00:00
ucontext_t *uc = p;
2018-07-13 01:31:50 +00:00
GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA),
&uc->uc_mcontext);
trap_myself();
}