Commit e44a3e798a18e872d52d1d860201971095e31047
1 parent
fe2b269a
TARGET_MAP_xx macros: clean and alpha specific values
- Clean TARGET_MAP_xx macros to avoid nested #if #endif - Add alpha specific values Based on a patch by Tristan Gingold git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5356 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
24 additions
and
5 deletions
linux-user/syscall_defs.h
| ... | ... | @@ -860,11 +860,14 @@ struct target_winsize { |
| 860 | 860 | |
| 861 | 861 | #include "termbits.h" |
| 862 | 862 | |
| 863 | +/* Common */ | |
| 863 | 864 | #define TARGET_MAP_SHARED 0x01 /* Share changes */ |
| 864 | 865 | #define TARGET_MAP_PRIVATE 0x02 /* Changes are private */ |
| 865 | -#define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */ | |
| 866 | -#define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */ | |
| 866 | +#define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */ | |
| 867 | + | |
| 868 | +/* Target specific */ | |
| 867 | 869 | #if defined(TARGET_MIPS) |
| 870 | +#define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */ | |
| 868 | 871 | #define TARGET_MAP_ANONYMOUS 0x0800 /* don't use a file */ |
| 869 | 872 | #define TARGET_MAP_GROWSDOWN 0x1000 /* stack-like segment */ |
| 870 | 873 | #define TARGET_MAP_DENYWRITE 0x2000 /* ETXTBSY */ |
| ... | ... | @@ -873,18 +876,34 @@ struct target_winsize { |
| 873 | 876 | #define TARGET_MAP_NORESERVE 0x0400 /* don't check for reservations */ |
| 874 | 877 | #define TARGET_MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ |
| 875 | 878 | #define TARGET_MAP_NONBLOCK 0x20000 /* do not block on IO */ |
| 876 | -#else | |
| 879 | +#elif defined(TARGET_PPC) | |
| 880 | +#define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */ | |
| 877 | 881 | #define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */ |
| 878 | 882 | #define TARGET_MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
| 879 | 883 | #define TARGET_MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
| 880 | 884 | #define TARGET_MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
| 881 | -#if defined(TARGET_PPC) | |
| 882 | 885 | #define TARGET_MAP_LOCKED 0x0080 /* pages are locked */ |
| 883 | 886 | #define TARGET_MAP_NORESERVE 0x0040 /* don't check for reservations */ |
| 887 | +#define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | |
| 888 | +#define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */ | |
| 889 | +#elif defined(TARGET_ALPHA) | |
| 890 | +#define TARGET_MAP_ANONYMOUS 0x10 /* don't use a file */ | |
| 891 | +#define TARGET_MAP_FIXED 0x100 /* Interpret addr exactly */ | |
| 892 | +#define TARGET_MAP_GROWSDOWN 0x01000 /* stack-like segment */ | |
| 893 | +#define TARGET_MAP_DENYWRITE 0x02000 /* ETXTBSY */ | |
| 894 | +#define TARGET_MAP_EXECUTABLE 0x04000 /* mark it as an executable */ | |
| 895 | +#define TARGET_MAP_LOCKED 0x08000 /* lock the mapping */ | |
| 896 | +#define TARGET_MAP_NORESERVE 0x10000 /* no check for reservations */ | |
| 897 | +#define TARGET_MAP_POPULATE 0x20000 /* pop (prefault) pagetables */ | |
| 898 | +#define TARGET_MAP_NONBLOCK 0x40000 /* do not block on IO */ | |
| 884 | 899 | #else |
| 900 | +#define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */ | |
| 901 | +#define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */ | |
| 902 | +#define TARGET_MAP_GROWSDOWN 0x0100 /* stack-like segment */ | |
| 903 | +#define TARGET_MAP_DENYWRITE 0x0800 /* ETXTBSY */ | |
| 904 | +#define TARGET_MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | |
| 885 | 905 | #define TARGET_MAP_LOCKED 0x2000 /* pages are locked */ |
| 886 | 906 | #define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */ |
| 887 | -#endif | |
| 888 | 907 | #define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
| 889 | 908 | #define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */ |
| 890 | 909 | #endif | ... | ... |