Commit Graph

60 Commits

Author SHA1 Message Date
31bcad2535 LibC: Implement truncate 2025-06-01 13:48:03 +03:00
b75970958e Kernel/LibC: Implement unlinkat 2025-06-01 13:48:03 +03:00
56fdf6002c Kernel/LibC: Implement pthread_kill 2025-06-01 13:48:03 +03:00
c957f1ddca LibC: Cleanup pthread code and add some pthread_attr functions
errno, pthread cleanup and pthread id are now stored in uthread. This
allows using these without TLS
2025-06-01 13:48:03 +03:00
b1065fa01d Kernel/LibC: Add ppoll syscall and fix poll
poll is now using its own syscall instead of wrapping aroung pselect.
This adds less overhead on top of poll and adds support for POLLHUP
2025-06-01 13:48:03 +03:00
1bd454b8fd Kernel/LibC: Implement utime* family functions
This patch adds *working*
 - utime
 - utimes
 - utimensat
 - futimens
2025-06-01 13:48:03 +03:00
e0d986dcd7 LibC: Add missing u_char and u_short types 2025-05-28 03:10:01 +03:00
c7be3dcd5b LibC: Add timer{add,sub,clear,isset,cmp}
These are not POSIX but used by used by some ports
2025-05-28 03:10:01 +03:00
89c9bfd052 Kernel/LibC: Implement socketpair for UNIX sockets 2025-05-28 03:10:01 +03:00
12b93567f7 Kernel/LibC: Implement getpeername 2025-05-28 03:10:01 +03:00
44b762f916 Kernel/LibC: Implement pwrite and make pread non-locking 2025-05-28 03:10:01 +03:00
ddcf414107 LibC: Fix netinet/in.h and arpa/inet.h definitions 2025-05-28 03:10:01 +03:00
1bcd1edbf5 Kernel/LibC: Implement basic epoll
This implementation is on top of inodes instead of fds as linux does it.
If I start finding ports/software that relies on epoll allowing
duplicate inodes, I will do what linux does.

I'm probably missing multiple epoll_notify's which may cause hangs but
the system seems to work fine :dd:
2025-05-13 10:18:05 +03:00
773b8de8ba LibC: Refactor pthread type definitions 2025-04-21 14:38:40 +03:00
6f9dc2a9b8 Kernel/LibC: Implement fchdir, cleanup chdir and getcwd 2025-04-19 21:28:31 +03:00
8a2df23260 LibC: Define RLIM_NLIMITS 2025-04-19 02:34:56 +03:00
46079a8612 LibC: Implement no-op posix_madvice
Also add non-posix prefixed definitions
2025-04-19 02:07:45 +03:00
4bcd3ed86f Kernel: Start working on TLS, add SYS_{SET,GET}_TLS 2025-04-15 23:31:17 +03:00
be786be67d Kernel/LibC: Implement pthread_join 2025-04-02 12:58:39 +03:00
28392050bf LibC: Make pthread_t pid_t 2025-04-02 12:58:39 +03:00
9066e62a97 Kernel/LibC: Implement sched_yield 2025-04-02 12:58:39 +03:00
5549696c3a Kernel/LibC: Implement pthread_self 2025-04-02 02:39:29 +03:00
2ba25b4c28 LibC: Add non standard types/values used by ports 2025-04-01 23:26:13 +03:00
c1618e2b5d Kernel/LibC: Add basic support for pthread_{create,exit} 2025-04-01 23:26:13 +03:00
9893c90e74 Kernel: Remove SYS_DUP and implement it using fcntl F_DUPFD 2025-01-17 19:29:47 +02:00
4b2c303873 LibC: Add weak_alias header that defines a weak_alias macro 2025-01-14 18:33:57 +02:00
713daf6cd3 Kernel/LibC: Add support for creating hardlinks 2024-12-03 16:12:26 +02:00
d58ca5f37a Kernel/LibC: Implement symlink{,at} 2024-12-02 20:13:38 +02:00
11b6ee423e LibC: Define timezone structure 2024-12-02 20:13:37 +02:00
a10ca47657 Kernel/LibC: Implement {,f}statvfs 2024-12-02 20:13:37 +02:00
ad1f175a39 Kernel/LibC: Implement getppid 2024-12-02 20:13:37 +02:00
6ed1435aeb Kernel/LibC: Implement tcgetpgrp 2024-12-02 20:13:37 +02:00
747c3b2a4b Kernel/LibC: Implement fsync 2024-12-02 20:13:37 +02:00
d465ea2a67 LibC: Fix headers :) 2024-11-27 21:32:10 +02:00
e431e90b20 Kernel/LibC: Implement all chown family function with fchownat 2024-09-17 18:35:01 +03:00
4aa466b948 Kernel/LibC: Implement all chmod family functions using fchmodat 2024-09-17 17:19:26 +03:00
3666525d24 Kernel/LibC: Implement readlink in terms of readlinkat 2024-09-17 16:38:15 +03:00
f1a4bbce53 Kernel/LibC: Implement all stat family functions with fstatat
This patch gets rid of 2 unnecessary syscalls!
2024-09-17 16:38:01 +03:00
708a720d9d Kernel: Remove SYS_OPEN
This can be done with SYS_OPENAT with fd set to AT_FDCWD
2024-09-17 16:16:47 +03:00
d88ee5c9ee Kernel/LibC: Implement creat with open
This allows getting rid of unnecessary SYS_CREATE. Directory creation
still has its own syscall, but I could combine it with SYS_OPEN also.
2024-09-17 15:55:53 +03:00
467ac6c365 Kernel/LibC: Implement SOCK_CLOEXEC and SOCK_NONBLOCK
This removes the need for fcntl after creating a socket :)
2024-09-11 21:59:11 +03:00
57300687ff LibC: Cleanup and fix missing LibC headers 2024-08-28 17:07:58 +03:00
991ae4383a Kernel/LibC: Implement fchmod 2024-08-25 15:07:42 +03:00
1cbba113fd LibC: Add and cleanup some networking structures and definitions 2024-08-22 15:10:41 +03:00
72f3fe0b12 LibC: Add empty files sys/param.h and sys/file.h
For some reason some ports include these files even when they detect
that they are not available
2024-08-22 14:47:59 +03:00
a5a097fa4a Kernel/LibC: Add initial pseudo terminal support
This patch implements posix_openpt() and ptsname()

grantpt() and unlockpt() are left in LibC as stubs, as posix_openpt
currently does all of the needed work.
2024-08-11 01:02:59 +03:00
ad645f31d0 Kernel/LibC: Add setsid() 2024-08-11 00:58:12 +03:00
a87ce41030 LibC: rename fd_set internal variable
binutils seems to need access to the internal type and uses this name
for lookup.
2024-08-09 16:55:52 +03:00
0c8cae4cc3 LibC: Move ioctl to <sys/ioctl.h>
Some ports seem to be assuming that ioctl exists there and not in
stropts.h
2024-08-09 16:54:30 +03:00
44f0ec601f Kernel: Expose /proc/meminfo and fix /proc/<pid>/meminfo
Thread was unconditionally calling <stack>->size() without validating
that the stack actually exists
2024-08-09 15:58:56 +03:00