mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-11 17:00:37 +00:00
Kernel: Implement _SC_OPEN_MAX
This commit is contained in:
parent
db31452bc2
commit
721788943d
Notes:
sideshowbarker
2024-07-19 02:11:18 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/721788943d9 Pull-request: https://github.com/SerenityOS/serenity/pull/3454 Reviewed-by: https://github.com/bugaevc
3 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,8 @@ long Process::sys$sysconf(int name)
|
|||
return Processor::processor_count();
|
||||
case _SC_PAGESIZE:
|
||||
return PAGE_SIZE;
|
||||
case _SC_OPEN_MAX:
|
||||
return max_open_file_descriptors();
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ enum {
|
|||
_SC_NPROCESSORS_CONF,
|
||||
_SC_NPROCESSORS_ONLN,
|
||||
_SC_PAGESIZE,
|
||||
_SC_OPEN_MAX
|
||||
};
|
||||
|
||||
#define PERF_EVENT_MALLOC 1
|
||||
|
|
|
@ -174,11 +174,13 @@ enum {
|
|||
_SC_NPROCESSORS_CONF,
|
||||
_SC_NPROCESSORS_ONLN,
|
||||
_SC_PAGESIZE,
|
||||
_SC_OPEN_MAX,
|
||||
};
|
||||
|
||||
#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
|
||||
#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
|
||||
#define _SC_PAGESIZE _SC_PAGESIZE
|
||||
#define _SC_OPEN_MAX _SC_OPEN_MAX
|
||||
|
||||
long sysconf(int name);
|
||||
|
||||
|
|
Loading…
Reference in a new issue