0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-15 22:41:12 +01:00

ircd::info: Query sysconf value for CLK_TCK.

This commit is contained in:
Jason Volk 2019-04-05 16:50:08 -07:00
parent 3a68b65fe8
commit e29ebb0b98
2 changed files with 15 additions and 0 deletions

View file

@ -45,6 +45,7 @@ namespace ircd::info
extern const size_t iov_max; extern const size_t iov_max;
extern const size_t aio_max; extern const size_t aio_max;
extern const size_t aio_reqprio_max; extern const size_t aio_reqprio_max;
extern const size_t clk_tck;
extern const size_t rlimit_as; extern const size_t rlimit_as;
extern const size_t rlimit_data; extern const size_t rlimit_data;
extern const size_t rlimit_rss; extern const size_t rlimit_rss;

View file

@ -336,6 +336,20 @@ ircd::info::rlimit_as
#endif #endif
}; };
#ifdef _SC_CLK_TCK
decltype(ircd::info::clk_tck)
ircd::info::clk_tck
{
size_t(syscall(::sysconf, _SC_CLK_TCK))
};
#else
decltype(ircd::info::clk_tck)
ircd::info::clk_tck
{
1 // prevent #DE
};
#endif
decltype(ircd::info::aio_reqprio_max) decltype(ircd::info::aio_reqprio_max)
ircd::info::aio_reqprio_max ircd::info::aio_reqprio_max
{ {