0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

Revert _SC_CLK_TCK removal for convenience and exotic systems.

This reverts commit 1c1ceeacba.
This commit is contained in:
Jason Volk 2020-07-31 19:17:06 -07:00
parent 3604e2d078
commit 2e35ec3d77
2 changed files with 15 additions and 0 deletions

View file

@ -51,6 +51,7 @@ namespace ircd::info
extern const versions sd6_version; extern const versions sd6_version;
// System configuration / information // System configuration / information
extern const size_t clk_tck;
extern const string_view clock_source; extern const string_view clock_source;
extern const size_t aio_reqprio_max; extern const size_t aio_reqprio_max;
extern const size_t aio_max; extern const size_t aio_max;

View file

@ -944,6 +944,20 @@ ircd::info::vdso_p
// System configuration // System configuration
// //
#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
static char ircd_info_clock_source[32]; static char ircd_info_clock_source[32];
decltype(ircd::info::clock_source) decltype(ircd::info::clock_source)
ircd::info::clock_source ircd::info::clock_source