[kernel] Expose a sysconf page to userspace
A structure, system_config, which is dynamically defined by the definitions/sysconf.yaml config, is now mapped into every user address space. The kernel fills this with information about itself and the running machine. User programs access this through the new j6_sysconf fake syscall in libj6. See: Github bug #242 See: [frobozz blog post](https://jsix.dev/posts/frobozz/) Tags:
This commit is contained in:
@@ -6,10 +6,15 @@ j6 = module("j6",
|
||||
sources = [
|
||||
"init.cpp",
|
||||
"include/j6/syscalls.h.cog",
|
||||
"include/j6/sysconf.h.cog",
|
||||
"syscalls.s.cog",
|
||||
"sysconf.cpp.cog",
|
||||
])
|
||||
|
||||
from glob import glob
|
||||
from os.path import join
|
||||
|
||||
sysconf = join(source_root, "definitions/sysconf.yaml")
|
||||
definitions = glob('definitions/**/*.def', recursive=True)
|
||||
|
||||
j6.add_depends([
|
||||
@@ -17,3 +22,8 @@ j6.add_depends([
|
||||
"syscalls.s.cog",
|
||||
], definitions)
|
||||
|
||||
j6.add_depends([
|
||||
"include/j6/sysconf.h.cog",
|
||||
"sysconf.cpp.cog",
|
||||
], [sysconf])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user