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:
parent
3a68b65fe8
commit
e29ebb0b98
2 changed files with 15 additions and 0 deletions
|
@ -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;
|
||||||
|
|
14
ircd/info.cc
14
ircd/info.cc
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue