0
0
Fork 0
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:
Jason Volk 2021-03-11 13:36:39 -08:00
parent 43b85dad87
commit fdd052da87
2 changed files with 6 additions and 0 deletions

View file

@ -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)

View file

@ -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;
}