2 ms·
You probably want to jump if you're "just before" the syscall, too, though. So you end up with basically this: syscall wrappers: https://github.com/scottlamb/s
by scottlamb 10y ago
You probably want to jump if you're "just before" the syscall, too, though. So you end up with basically this:
syscall wrappers: https://github.com/scottlamb/sigsafe/blob/master/src/x86_64-linux/sigsafe_syscalls.S https://github.com/scottlamb/sigsafe/blob/master/src/x86_64-... (probably could do something better with that thread local; and as I mentioned this isn't using vsyscall)
signal handler: https://github.com/scottlamb/sigsafe/blob/master/src/x86_64-linux/sighandler_platform.c https://github.com/scottlamb/sigsafe/blob/master/src/x86_64-... (although it bugs me now that I iterate the whole array if the instruction pointer's not in any of the syscalls)
and just to be sure, a race checker: https://github.com/scottlamb/sigsafe/blob/master/tests/race_checker/race_checker.c https://github.com/scottlamb/sigsafe/blob/master/tests/race_...