um: export signals_enabled directly
Use signals_enabled instead of always jumping through a function call to read it, there's not much point in that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
2efea7dfaa
commit
fbb42e7fe2
@ -2,15 +2,15 @@
|
||||
#ifndef __UM_IRQFLAGS_H
|
||||
#define __UM_IRQFLAGS_H
|
||||
|
||||
extern int get_signals(void);
|
||||
extern int set_signals(int enable);
|
||||
extern void block_signals(void);
|
||||
extern void unblock_signals(void);
|
||||
extern int signals_enabled;
|
||||
int set_signals(int enable);
|
||||
void block_signals(void);
|
||||
void unblock_signals(void);
|
||||
|
||||
#define arch_local_save_flags arch_local_save_flags
|
||||
static inline unsigned long arch_local_save_flags(void)
|
||||
{
|
||||
return get_signals();
|
||||
return signals_enabled;
|
||||
}
|
||||
|
||||
#define arch_local_irq_restore arch_local_irq_restore
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <sysdep/archsetjmp.h>
|
||||
#include <os.h>
|
||||
|
||||
extern int signals_enabled;
|
||||
extern int setjmp(jmp_buf);
|
||||
extern void longjmp(jmp_buf, int);
|
||||
|
||||
@ -12,13 +13,12 @@ extern void longjmp(jmp_buf, int);
|
||||
longjmp(*buf, val); \
|
||||
} while(0)
|
||||
|
||||
#define UML_SETJMP(buf) ({ \
|
||||
int n; \
|
||||
volatile int enable; \
|
||||
enable = get_signals(); \
|
||||
n = setjmp(*buf); \
|
||||
if(n != 0) \
|
||||
set_signals_trace(enable); \
|
||||
#define UML_SETJMP(buf) ({ \
|
||||
int n, enable; \
|
||||
enable = *(volatile int *)&signals_enabled; \
|
||||
n = setjmp(*buf); \
|
||||
if(n != 0) \
|
||||
set_signals_trace(enable); \
|
||||
n; })
|
||||
|
||||
#endif
|
||||
|
@ -237,7 +237,6 @@ extern void send_sigio_to_self(void);
|
||||
extern int change_sig(int signal, int on);
|
||||
extern void block_signals(void);
|
||||
extern void unblock_signals(void);
|
||||
extern int get_signals(void);
|
||||
extern int set_signals(int enable);
|
||||
extern int set_signals_trace(int enable);
|
||||
extern int os_is_signal_stack(void);
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <os.h>
|
||||
|
||||
EXPORT_SYMBOL(set_signals);
|
||||
EXPORT_SYMBOL(get_signals);
|
||||
EXPORT_SYMBOL(signals_enabled);
|
||||
|
||||
EXPORT_SYMBOL(os_stat_fd);
|
||||
EXPORT_SYMBOL(os_stat_file);
|
||||
|
@ -62,7 +62,7 @@ static void sig_handler_common(int sig, struct siginfo *si, mcontext_t *mc)
|
||||
#define SIGALRM_BIT 1
|
||||
#define SIGALRM_MASK (1 << SIGALRM_BIT)
|
||||
|
||||
static int signals_enabled;
|
||||
int signals_enabled;
|
||||
static unsigned int signals_pending;
|
||||
static unsigned int signals_active = 0;
|
||||
|
||||
@ -334,11 +334,6 @@ void unblock_signals(void)
|
||||
}
|
||||
}
|
||||
|
||||
int get_signals(void)
|
||||
{
|
||||
return signals_enabled;
|
||||
}
|
||||
|
||||
int set_signals(int enable)
|
||||
{
|
||||
int ret;
|
||||
|
Loading…
Reference in New Issue
Block a user