mirror of
https://github.com/matrix-construct/construct
synced 2024-06-02 10:08:56 +02:00
ircd::fs::map: Add MAP_LOCKED wrapper to interface opts.
This commit is contained in:
parent
43b85dad87
commit
fdd052da87
|
@ -48,6 +48,7 @@ struct ircd::fs::map::opts
|
|||
bool shared {false};
|
||||
bool reserve {false};
|
||||
bool populate {false};
|
||||
bool locked {false};
|
||||
|
||||
opts(const fd::opts &opts = {std::ios::in})
|
||||
:fd::opts(opts)
|
||||
|
|
|
@ -2181,6 +2181,11 @@ ircd::fs::flags(const map::opts &opts)
|
|||
ret |= MAP_NORESERVE;
|
||||
#endif
|
||||
|
||||
#if defined(MAP_LOCKED)
|
||||
if(opts.locked)
|
||||
ret |= MAP_LOCKED;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue