mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
LibC: Add POSIX timer constants
This commit is contained in:
parent
99a79a364a
commit
496988de47
Notes:
sideshowbarker
2024-07-18 16:55:25 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/496988de476 Pull-request: https://github.com/SerenityOS/serenity/pull/7757
@ -14,6 +14,8 @@ namespace Kernel {
|
||||
KResultOr<long> Process::sys$sysconf(int name)
|
||||
{
|
||||
switch (name) {
|
||||
case _SC_MONOTONIC_CLOCK:
|
||||
return 1;
|
||||
case _SC_NPROCESSORS_CONF:
|
||||
case _SC_NPROCESSORS_ONLN:
|
||||
return Processor::processor_count();
|
||||
|
@ -37,6 +37,7 @@
|
||||
#define MS_REMOUNT (1 << 5)
|
||||
|
||||
enum {
|
||||
_SC_MONOTONIC_CLOCK,
|
||||
_SC_NPROCESSORS_CONF,
|
||||
_SC_NPROCESSORS_ONLN,
|
||||
_SC_OPEN_MAX,
|
||||
|
@ -141,7 +141,9 @@ enum {
|
||||
#define MS_RDONLY (1 << 4)
|
||||
#define MS_REMOUNT (1 << 5)
|
||||
|
||||
#define _POSIX_MONOTONIC_CLOCK 200112L
|
||||
#define _POSIX_SAVED_IDS
|
||||
#define _POSIX_TIMERS 200809L
|
||||
|
||||
/*
|
||||
* We aren't fully compliant (don't support policies, and don't have a wide
|
||||
@ -151,6 +153,7 @@ enum {
|
||||
#define _POSIX_VDISABLE '\0'
|
||||
|
||||
enum {
|
||||
_SC_MONOTONIC_CLOCK,
|
||||
_SC_NPROCESSORS_CONF,
|
||||
_SC_NPROCESSORS_ONLN,
|
||||
_SC_OPEN_MAX,
|
||||
@ -160,6 +163,7 @@ enum {
|
||||
_SC_CLK_TCK,
|
||||
};
|
||||
|
||||
#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
|
||||
#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
|
||||
#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
|
||||
#define _SC_OPEN_MAX _SC_OPEN_MAX
|
||||
|
Loading…
Reference in New Issue
Block a user