Skip to content

Commit

Permalink
add MAP_SYNC and MAP_SHARED_VALIDATE from linux v4.15
Browse files Browse the repository at this point in the history
for synchronous page faults, new in linux commit
1c9725974074a047f6080eecc62c50a8e840d050 and
b6fb293f2497a9841d94f6b57bd2bb2cd222da43
note that only targets that use asm-generic/mman.h have this new
flag defined, so undef it on other targets (mips*, powerpc*).
  • Loading branch information
Szabolcs Nagy authored and Rich Felker committed Feb 22, 2018
1 parent 9eda4dc commit 9b57db3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/mips/bits/mman.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define MAP_STACK 0x40000
#undef MAP_HUGETLB
#define MAP_HUGETLB 0x80000
#undef MAP_SYNC

#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#undef MADV_SOFT_OFFLINE
Expand Down
1 change: 1 addition & 0 deletions arch/mips64/bits/mman.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define MAP_STACK 0x40000
#undef MAP_HUGETLB
#define MAP_HUGETLB 0x80000
#undef MAP_SYNC

#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#undef MADV_SOFT_OFFLINE
Expand Down
1 change: 1 addition & 0 deletions arch/mipsn32/bits/mman.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define MAP_STACK 0x40000
#undef MAP_HUGETLB
#define MAP_HUGETLB 0x80000
#undef MAP_SYNC

#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#undef MADV_SOFT_OFFLINE
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/bits/mman.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define MAP_NORESERVE 0x40
#undef MAP_LOCKED
#define MAP_LOCKED 0x80
#undef MAP_SYNC

#undef MCL_CURRENT
#define MCL_CURRENT 0x2000
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc64/bits/mman.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define MAP_NORESERVE 0x40
#undef MAP_LOCKED
#define MAP_LOCKED 0x80
#undef MAP_SYNC

#undef MCL_CURRENT
#define MCL_CURRENT 0x2000
Expand Down
2 changes: 2 additions & 0 deletions include/sys/mman.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extern "C" {

#define MAP_SHARED 0x01
#define MAP_PRIVATE 0x02
#define MAP_SHARED_VALIDATE 0x03
#define MAP_TYPE 0x0f
#define MAP_FIXED 0x10
#define MAP_ANON 0x20
Expand All @@ -33,6 +34,7 @@ extern "C" {
#define MAP_NONBLOCK 0x10000
#define MAP_STACK 0x20000
#define MAP_HUGETLB 0x40000
#define MAP_SYNC 0x80000
#define MAP_FILE 0

#define MAP_HUGE_SHIFT 26
Expand Down

0 comments on commit 9b57db3

Please sign in to comment.