aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/choose-mode.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/include/choose-mode.h')
-rw-r--r--arch/um/include/choose-mode.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/arch/um/include/choose-mode.h b/arch/um/include/choose-mode.h
deleted file mode 100644
index b87b36a87d91..000000000000
--- a/arch/um/include/choose-mode.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __CHOOSE_MODE_H__
7#define __CHOOSE_MODE_H__
8
9#include "uml-config.h"
10
11#if defined(UML_CONFIG_MODE_TT) && defined(UML_CONFIG_MODE_SKAS)
12#define CHOOSE_MODE(tt, skas) (mode_tt ? (tt) : (skas))
13
14extern int mode_tt;
15static inline void *__choose_mode(void *tt, void *skas) {
16 return mode_tt ? tt : skas;
17}
18
19#define __CHOOSE_MODE(tt, skas) (*( (typeof(tt) *) __choose_mode(&(tt), &(skas))))
20
21#elif defined(UML_CONFIG_MODE_SKAS)
22#define CHOOSE_MODE(tt, skas) (skas)
23
24#elif defined(UML_CONFIG_MODE_TT)
25#define CHOOSE_MODE(tt, skas) (tt)
26
27#else
28#error CONFIG_MODE_SKAS and CONFIG_MODE_TT are both disabled
29#endif
30
31#define CHOOSE_MODE_PROC(tt, skas, args...) \
32 CHOOSE_MODE(tt(args), skas(args))
33
34#ifndef __CHOOSE_MODE
35#define __CHOOSE_MODE(tt, skas) CHOOSE_MODE(tt, skas)
36#endif
37
38#endif