cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

longjmp.h (493B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2#ifndef __UML_LONGJMP_H
      3#define __UML_LONGJMP_H
      4
      5#include <sysdep/archsetjmp.h>
      6#include <os.h>
      7
      8extern int signals_enabled;
      9extern int setjmp(jmp_buf);
     10extern void longjmp(jmp_buf, int);
     11
     12#define UML_LONGJMP(buf, val) do { \
     13	longjmp(*buf, val);	\
     14} while(0)
     15
     16#define UML_SETJMP(buf) ({				\
     17	int n, enable;					\
     18	enable = *(volatile int *)&signals_enabled;	\
     19	n = setjmp(*buf);				\
     20	if(n != 0)					\
     21		um_set_signals_trace(enable);		\
     22	n; })
     23
     24#endif