mmap.2: srcfix: rewrap source lines

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2018-04-12 09:31:30 +02:00
parent 228d889fc7
commit 007d7833b0
1 changed files with 10 additions and 8 deletions

View File

@ -276,16 +276,18 @@ with respect to the
.I addr .I addr
enforcement, but different in that enforcement, but different in that
.B MAP_FIXED_NOREPLACE .B MAP_FIXED_NOREPLACE
never clobbers a pre-existing never clobbers a pre-existing mapped range.
mapped range. If the requested range would collide with an existing If the requested range would collide with an existing mapping,
mapping, then this call fails with then this call fails with
.B EEXIST. .B EEXIST.
This flag can therefore be used as a way to atomically (with respect to other This flag can therefore be used as a way to atomically
threads) attempt to map an address range: one thread will succeed; all others (with respect to other threads) attempt to map an address range:
will report failure. Please note that older kernels which do not recognize this one thread will succeed; all others will report failure.
Please note that older kernels which do not recognize this
flag will typically (upon detecting a collision with a pre-existing mapping) flag will typically (upon detecting a collision with a pre-existing mapping)
fall back to a "non-MAP_FIXED" type of behavior: they will return an address that fall back to a "non-MAP_FIXED" type of behavior:
is different than the requested one. Therefore, backward-compatible software they will return an address that is different than the requested one.
Therefore, backward-compatible software
should check the returned address against the requested address. should check the returned address against the requested address.
.TP .TP
.B MAP_GROWSDOWN .B MAP_GROWSDOWN