FENIX_main/notes/libk stuff

384 lines
6 KiB
Text
Raw Permalink Normal View History

2021-01-31 20:08:26 +00:00
(Almost) all of this will be in libc as well, but this stuff should be a part
of libk (the libc makefile's FREE_OBJS variable). Anything not on this list
that the kernel will need that isn't otherwise a part of the libc is probably
best put in kernel dev, rather than in libc dev (e.g. info on the elf format
or endianness). This also isn't a complete list. This is based off what the
Linux klibc has that overlaps with what a POSIX-compliant libc has. We may need
to add more from the POSIX libc, and I may have not put in dependencies here or
there (types that are needed, or macros, or functions, or whatever).
X - complete; ~ - prototype exists; ? - not sure if done
Unless otherwise specified, *() denotes a function, *[] an array variable,
* \* a pointer, [A-Z_0-9]+ a macro, [a-z_0-9] a variable or type, and anything
prefixed with struct is a struct.
(hello() is a function, hello[] is an array, hello * is a pointer, HELLO is a
macro, HELLO() is a function macro, hello is a variable or type, and
struct hello is a struct.)
arpa/inet.h
inet_addr()
inet_ntoa()
inet_ntop()
inet_pton()
assert.h (complete)
ctype.h (complete as far as libk is concerned - don't need locale variants)
dirent.h
DIR type
struct dirent
alphasort()
closedir()
fdopendir()
opendir()
readdir()
dirrd()
scandir()
errno.h (complete)
fcntl.h
struct flock
open()
openat()
creat()
fcntl()
Neccesary macros for the above
fnmatch.h
X FNM_NOMATCH
X FNM_PATHNAME
X FNM_PERIOD
X FNM_NOESCAPE
~ fnmatch()
grp.h
X struct group
~ getgrid()
~ getgrnam()
inttypes.h
imaxabs()
strtoimax()
limits.h (complete)
net/if.h
netinet/in.h
netinet/tcp.h
poll.h
pwd.h
struct passwd
getpwuid()
getpwman()
sched.h
struct sched_param
sched_setscheduler()
sched_yield()
setjmp.h
sigjmp_buf[]
setjmp()
longjmp()
sigsetjmp()
siglongjmp()
signal.h
sig_atomic_t
SIGRTMIN
SIGRTMAX
sigemptyset()
sigfillset()
sigaddset()
sigdelset()
sigismember()
signal()
sigaction()
sigprocmask()
sigpending()
sigsuspend()
raise()
kill()
stdarg.h
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
stdbool.h (complete)
stddef.h (complete)
stdint.h (complete)
stdio.h
X FILE type
X EOF
X BUFSIZ
X _IO*BF
X stdin, stdout, stderr
~ fopen()
~ fdopen()
~ fclose()
~ fseek()
~ rewind()
~ fputs()
fputs_unlocked()
X puts()
~ fputc()
~ putc()
X putchar()
fputc_unlocked()
putchar_unlocked()
putc_unlocked()
~ fgetc()
fgetc_unlocked()
~ fgets()
fgets_unlocked()
~ getc()
~ getchar()
getc_unlocked()
getchar_unlocked()
~ ungetc()
X printf()
~ vprintf()
~ fprintf()
~ vfprintf()
~ sprintf()
~ vsprintf()
~ snprintf()
~ vsnprintf()
~ sscanf()
~ vsscanf()
? perror()
rename()
renameat()
remove()
~ fread()
~ fwrite()
ftell()
~ ferror()
~ feof()
fileno()
~ clearrerr()
stdlib.h
X EXIT_FAILURE
X EXIT_SUCCESS
? abort()
X abs()
~ system()
~ atexit()
~ atoi()
~ atol()
~ atoll
~ exit()
~_Exit()
X labs()
X llabs()
~ strtol()
~ strtoll()
~ strtoul()
~ strtoull()
~ getenv()
putenv()
setenv()
unsetenv()
X bsearch()
~ qsort()
X srand()
X rand()
srand48()
jrand48()
mrand48()
nrand48()
lrand48()
random()
srandom()
unlockpt()
ptsname()
posix_openpt()
grantpt()
realpath()
string.h
memccpy()
memchr()
X memcmp()
X memcpy()
X memmove()
X memset()
X strcat()
~ strchr()
X strcmp()
~ strcpy()
X strcspn()
strdup()
~ strerror()
strsignal()
X strlen()
~ strncat()
~ strncmp()
~ strncpy()
strpbrk()
~ strstr()
X strtok()
strtok_r()
sys/mman.h
mmap()
munmap()
shm_open()
shm_unlink()
msync()
mprotect()
mlockall()
munlockall()
mlock()
munlock()
sys/resource.h
getpriority()
setpriority()
getrusage()
sys/select.h
FD_CLR()
FD_ISSET()
FD_SET()
FD_ZERO()
FD_SETSIZE
select()
pselect()
sys/socket.h
X sa_family_t
X struct sockaddr
X socklen_t
struct msghdr
struct cmsghdr
CMSG_DATA()
CMSG_NXTHDR()
CMSG_FIRSTHDR()
accept()
bind()
connect()
getpeername()
getsockname()
getsockopt()
listen()
recv()
recvfrom()
recvmsg()
send()
sendmsg()
sendto()
setsockopt()
shutdown()
socket()
socketpair()
sys/stat.h
S_IFMT macro family
S_I[RWX](USR|GRP|OTH) and related macros
S_IS. macro family
stat()
fstat()
fstatat()
lstat()
umask()
mknod()
mknodat()
mkfifo()
utimensat()
fchmodat()
sys/statvfs.h
struct statvfs
fstatvfs()
statvfs()
sys/time.h
gettimeofday()
gettitimer()
settitimer()
utimes()
sys/uio.h
struct iovec
readv()
writev()
sys/un.h
???
sys/utsname.h
X struct utsname
~ uname()
sys/wait.h
WEXITSTATUS()
WTERMSIG()
WIFEXITED()
WIFSTOPPED()
WIFSIGNALED()
WSTOPSIG()
X wait()
waitpid()
syslog.h
~ closelog()
~ openlog()
~ syslog()
termios.h
TCSANOW
TCSADRAIN
TCSAFLUSH
tcgetattr()
tcsetattr()
tcflow()
tcflush()
tcdrain()
tcgetsid()
tcsendbreak()
cfgetospeed()
cfgetispeed()
cfsetospeed()
cfsetispeed()
time.h
X time()
~ nanosleep()
unistd.h
X F_OK
X R_OK
X W_OK
X X_OK
STDERR_FILENO
STDIN_FILENO
STDOUT_FILENO
access()
chdir()
chown()
close()
dup()
dup2()
_exit()
execl()
execle()
execlp()
execv()
execve()
execvp()
faccessat()
fchdir()
fchown()
fchownat()
fdatasync()
fork()
fsync()
ftruncate()
getegid()
geteuid()
getgid()
getgroups()
gethostname()
getopt()
getuid()
isatty()
lchown()
link()
linkat()
lseek()
nice()
pipe()
pread()
pwrite()
read()
readlink()
readlinkat()
rmdir()
setegid()
seteuid()
setgid()
setuid()
sleep()
symlink()
symlinkat()
sync()
unlink()
unlinkat()
write()
utime.h
struct utimbuf
utime()