Closed tekknolagi closed 3 years ago
So far: exit
, read
, write
. Everything is a file, so that should be enough, right? 😛
But seriously we do need at least open
and close
. And probably the directory and socket calls.
But we're not going to support them all. Certainly not all the ioctl()
s.
Draft list:
exit
~read
~write
~open
close
creat
unlink
rename
I was going to add socket ones like bind
and accept
-- but they aren't syscalls!
Man, it sucks that POSIX is defined in terms of libc. The operating system interfaces defined in terms of a single language's standard library. Such ugly design. The whole thing is lying to generations of programmers.
Looks like the socket API is multiplexed through socketcall
: http://man7.org/linux/man-pages/man2/socketcall.2.html
Somebody actually mentioned it on Mastodon yesterday: https://social.coop/@h/100450184726157532. But I didn't know what I was looking at.
So we'll add the following:
socketcall
// socket
socketcall
// bind
socketcall
// connect
socketcall
// listen
socketcall
// accept
socketcall
// send
socketcall
// recv
socketcall
// shutdown
brk
Suggestion: use a checklist instead of an OL. But I like that idea.
Non-socket syscalls are done: https://github.com/akkartik/mu/commit/5cec03b414
This ticket has probably gone as far as it will go. If necessary we'll open another one for socket syscalls at some point.
https://syscalls.kernelgrok.com/