mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
Revert _SC_CLK_TCK removal for convenience and exotic systems.
This reverts commit 1c1ceeacba
.
This commit is contained in:
parent
3604e2d078
commit
2e35ec3d77
2 changed files with 15 additions and 0 deletions
|
@ -51,6 +51,7 @@ namespace ircd::info
|
|||
extern const versions sd6_version;
|
||||
|
||||
// System configuration / information
|
||||
extern const size_t clk_tck;
|
||||
extern const string_view clock_source;
|
||||
extern const size_t aio_reqprio_max;
|
||||
extern const size_t aio_max;
|
||||
|
|
14
ircd/info.cc
14
ircd/info.cc
|
@ -944,6 +944,20 @@ ircd::info::vdso_p
|
|||
// 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];
|
||||
decltype(ircd::info::clock_source)
|
||||
ircd::info::clock_source
|
||||
|
|
Loading…
Reference in a new issue