mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 07:47:50 +00:00
Turn signals_enabled, signals_pending and signals_active into thread-local variables. This enables us to control and track signals independently on each CPU thread. This is a preparation for adding SMP support. Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20251027001815.1666872-3-tiwei.bie@linux.dev Signed-off-by: Johannes Berg <johannes.berg@intel.com>
24 lines
450 B
C
24 lines
450 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __UML_LONGJMP_H
|
|
#define __UML_LONGJMP_H
|
|
|
|
#include <sysdep/archsetjmp.h>
|
|
#include <os.h>
|
|
|
|
extern int setjmp(jmp_buf);
|
|
extern void longjmp(jmp_buf, int);
|
|
|
|
#define UML_LONGJMP(buf, val) do { \
|
|
longjmp(*buf, val); \
|
|
} while(0)
|
|
|
|
#define UML_SETJMP(buf) ({ \
|
|
int n, enable; \
|
|
enable = um_get_signals(); \
|
|
n = setjmp(*buf); \
|
|
if(n != 0) \
|
|
um_set_signals_trace(enable); \
|
|
n; })
|
|
|
|
#endif
|