Kernel: Add _SC_CLK_TCK to sysconf.

Unbreaks the hatari port.
This commit is contained in:
thatdutchguy 2021-03-16 11:05:23 -07:00 committed by Andreas Kling
parent fa6bce5087
commit 10e3e8f6d4
Notes: sideshowbarker 2024-07-18 21:17:29 +09:00
3 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,9 @@ KResultOr<long> Process::sys$sysconf(int name)
return TTY_NAME_MAX;
case _SC_GETPW_R_SIZE_MAX:
return 4096; // idk
case _SC_CLK_TCK:
// FIXME: should return Number of clock intervals per second for times()
return 100; // seems to be 100 on x86_64
default:
return EINVAL;
}

View File

@ -63,6 +63,7 @@ enum {
_SC_TTY_NAME_MAX,
_SC_PAGESIZE,
_SC_GETPW_R_SIZE_MAX,
_SC_CLK_TCK,
};
#define PERF_EVENT_SAMPLE 0

View File

@ -177,6 +177,7 @@ enum {
_SC_TTY_NAME_MAX,
_SC_PAGESIZE,
_SC_GETPW_R_SIZE_MAX,
_SC_CLK_TCK,
};
#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF