authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-04-16 13:24:03 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-04-16 13:24:03 -07:00
log9f074e9ff967193c020656835de8422f9f25a20c
tree8fae92ad9b1ce52017da4ba2417a0371dcdd930b
parent3a855256cddb75385eb6cb060512ddcee3857c49

progress


1 files changed, 112 insertions(+), 0 deletions(-)

mod.zig+112
......@@ -470,70 +470,99 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
470470// int sched_rr_get_interval(pid_t pid, struct timespec *tp);
471471
472472// mlock
473// int mlock(const void addr[.len], size_t len);
473474
474475// munlock
476// int munlock(const void addr[.len], size_t len);
475477
476478// mlockall
479// int mlockall(int flags);
477480
478481// munlockall
482// int munlockall(void);
479483
480484// vhangup
485// int vhangup(void);
481486
482487// modify_ldt
488// int syscall(SYS_modify_ldt, int func, void ptr[.bytecount], unsigned long bytecount);
483489
484490// pivot_root
491// int syscall(SYS_pivot_root, const char *new_root, const char *put_old);
485492
486493// _sysctl
494// [[deprecated]] int _sysctl(struct __sysctl_args *args);
487495
488496// prctl
497// int prctl(int op, ... /* unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5 */ );
489498
490499// arch_prctl
491500
492501// adjtimex
502// int adjtimex(struct timex *buf);
493503
494504// setrlimit
495505// int setrlimit(int resource, const struct rlimit *rlim);
496506
497507// chroot
508// int chroot(const char *path);
498509
499510// sync
511// void sync(void);
500512
501513// acct
514// int acct(const char *_Nullable filename);
502515
503516// settimeofday
504517// int settimeofday(const struct timeval *tv, const struct timezone *_Nullable tz);
505518
506519// mount
520// int mount(const char *source, const char *target, const char *filesystemtype, unsigned long mountflags, const void *_Nullable data);
507521
508522// umount2
523// int umount2(const char *target, int flags);
509524
510525// swapon
526// int swapon(const char *path, int swapflags);
511527
512528// swapoff
529// int swapoff(const char *path);
513530
514531// reboot
532// int reboot(int op);
515533
516534// sethostname
535// int sethostname(const char *name, size_t len);
517536
518537// setdomainname
538// int setdomainname(const char *name, size_t len);
519539
520540// iopl
541// [[deprecated]] int iopl(int level);
521542
522543// ioperm
544// int ioperm(unsigned long from, unsigned long num, int turn_on);
523545
524546// create_module
547// [[deprecated]] caddr_t create_module(const char *name, size_t size);
525548
526549// init_module
550// int syscall(SYS_init_module, void module_image[.len], unsigned long len, const char *param_values);
527551
528552// delete_module
553// int syscall(SYS_delete_module, const char *name, unsigned int flags);
529554
530555// get_kernel_syms
556// [[deprecated]] int get_kernel_syms(struct kernel_sym *table);
531557
532558// query_module
559// [[deprecated]] int query_module(const char *name, int which, void buf[.bufsize], size_t bufsize, size_t *ret);
533560
534561// quotactl
562// int quotactl(int op, const char *_Nullable special, int id, caddr_t addr);
535563
536564// nfsservctl
565// long nfsservctl(int cmd, struct nfsctl_arg *argp, union nfsctl_res *resp);
537566
538567// getpmsg
539568
......@@ -546,102 +575,147 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
546575// security
547576
548577// gettid
578// pid_t gettid(void);
549579
550580// readahead
581// ssize_t readahead(int fd, off_t offset, size_t count);
551582
552583// setxattr
584// int setxattr(const char *path, const char *name, const void value[.size], size_t size, int flags);
553585
554586// lsetxattr
587// int lsetxattr(const char *path, const char *name, const void value[.size], size_t size, int flags);
555588
556589// fsetxattr
590// int fsetxattr(int fd, const char *name, const void value[.size], size_t size, int flags);
557591
558592// getxattr
593// ssize_t getxattr(const char *path, const char *name, void value[.size], size_t size);
559594
560595// lgetxattr
596// ssize_t lgetxattr(const char *path, const char *name, void value[.size], size_t size);
561597
562598// fgetxattr
599// ssize_t fgetxattr(int fd, const char *name, void value[.size], size_t size);
563600
564601// listxattr
602// ssize_t listxattr(const char *path, char *_Nullable list, size_t size);
565603
566604// llistxattr
605// ssize_t llistxattr(const char *path, char *_Nullable list, size_t size);
567606
568607// flistxattr
608// ssize_t flistxattr(int fd, char *_Nullable list, size_t size);
569609
570610// removexattr
611// int removexattr(const char *path, const char *name);
571612
572613// lremovexattr
614// int lremovexattr(const char *path, const char *name);
573615
574616// fremovexattr
617// int fremovexattr(int fd, const char *name);
575618
576619// tkill
620// [[deprecated]] int syscall(SYS_tkill, pid_t tid, int sig);
577621
578622// time
623// time_t time(time_t *_Nullable tloc);
579624
580625// futex
626// long syscall(SYS_futex, uint32_t *uaddr, int futex_op, uint32_t val, const struct timespec *timeout, /* or: uint32_t val2 */ uint32_t *uaddr2, uint32_t val3);
581627
582628// sched_setaffinity
629// int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *mask);
583630
584631// sched_getaffinity
632// int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask);
585633
586634// set_thread_area
587635
588636// io_setup
637// long io_setup(unsigned int nr_events, aio_context_t *ctx_idp);
589638
590639// io_destroy
640// int syscall(SYS_io_destroy, aio_context_t ctx_id);
591641
592642// io_getevents
643// int syscall(SYS_io_getevents, aio_context_t ctx_id, long min_nr, long nr, struct io_event *events, struct timespec *timeout);
593644
594645// io_submit
646// int io_submit(aio_context_t ctx_id, long nr, struct iocb **iocbpp);
595647
596648// io_cancel
649// int syscall(SYS_io_cancel, aio_context_t ctx_id, struct iocb *iocb, struct io_event *result);
597650
598651// get_thread_area
599652
600653// lookup_dcookie
654// int syscall(SYS_lookup_dcookie, uint64_t cookie, char *buffer, size_t len);
601655
602656// epoll_create
657// int epoll_create(int size);
603658
604659// epoll_ctl_old
660// int epoll_ctl(int epfd, int op, int fd, struct epoll_event *_Nullable event);
605661
606662// epoll_wait_old
663// int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout);
607664
608665// remap_file_pages
666// [[deprecated]] int remap_file_pages(void addr[.size], size_t size, int prot, size_t pgoff, int flags);
609667
610668// getdents64
669// ssize_t getdents64(int fd, void dirp[.count], size_t count);
611670
612671// set_tid_address
672// pid_t syscall(SYS_set_tid_address, int *tidptr);
613673
614674// restart_syscall
615675
616676// semtimedop
677// int semtimedop(int semid, struct sembuf *sops, size_t nsops, const struct timespec *_Nullable timeout);
617678
618679// fadvise64
619680
620681// timer_create
682// int timer_create(clockid_t clockid, struct sigevent *_Nullable restrict sevp, timer_t *restrict timerid);
621683
622684// timer_settime
685// int timer_settime(timer_t timerid, int flags, const struct itimerspec *restrict new_value, struct itimerspec *_Nullable restrict old_value);
623686
624687// timer_gettime
688// int timer_gettime(timer_t timerid, struct itimerspec *curr_value);
625689
626690// timer_getoverrun
691// int timer_getoverrun(timer_t timerid);
627692
628693// timer_delete
694// int timer_delete(timer_t timerid);
629695
630696// clock_settime
697// int clock_settime(clockid_t clockid, const struct timespec *tp);
631698
632699// clock_gettime
700// int clock_gettime(clockid_t clockid, struct timespec *tp);
633701
634702// clock_getres
703// int clock_getres(clockid_t clockid, struct timespec *_Nullable res);
635704
636705// clock_nanosleep
706// int clock_nanosleep(clockid_t clockid, int flags, const struct timespec *t, struct timespec *_Nullable remain);
637707
638708// exit_group
709// [[noreturn]] void syscall(SYS_exit_group, int status);
639710
640711// epoll_wait
712// int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout);
641713
642714// epoll_ctl
715// int epoll_ctl(int epfd, int op, int fd, struct epoll_event *_Nullable event);
643716
644717// tgkill
718// int tgkill(pid_t tgid, pid_t tid, int sig);
645719
646720// utimes
647721// int utimes(const char *filename, const struct timeval times[_Nullable 2]);
......@@ -649,44 +723,64 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
649723// vserver
650724
651725// mbind
726// long mbind(void addr[.len], unsigned long len, int mode, const unsigned long nodemask[(.maxnode + ULONG_WIDTH - 1) / ULONG_WIDTH], unsigned long maxnode, unsigned int flags);
652727
653728// set_mempolicy
729// long set_mempolicy(int mode, const unsigned long *nodemask, unsigned long maxnode);
654730
655731// get_mempolicy
732// long get_mempolicy(int *mode, unsigned long nodemask[(.maxnode + ULONG_WIDTH - 1) / ULONG_WIDTH], unsigned long maxnode, void *addr, unsigned long flags);
656733
657734// mq_open
735// mqd_t mq_open(const char *name, int oflag, mode_t mode, struct mq_attr *attr);
658736
659737// mq_unlink
738// int mq_unlink(const char *name);
660739
661740// mq_timedsend
741// int mq_timedsend(mqd_t mqdes, const char msg_ptr[.msg_len], size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout);
662742
663743// mq_timedreceive
744// ssize_t mq_timedreceive(mqd_t mqdes, char *restrict msg_ptr[.msg_len], size_t msg_len, unsigned int *restrict msg_prio, const struct timespec *restrict abs_timeout);
664745
665746// mq_notify
747// int mq_notify(mqd_t mqdes, const struct sigevent *sevp);
666748
667749// mq_getsetattr
750// int syscall(SYS_mq_getsetattr, mqd_t mqdes, const struct mq_attr *newattr, struct mq_attr *oldattr);
668751
669752// kexec_load
753// long syscall(SYS_kexec_load, unsigned long entry, unsigned long nr_segments, struct kexec_segment *segments, unsigned long flags);
670754
671755// waitid
756// int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options);
672757
673758// add_key
759// key_serial_t add_key(const char *type, const char *description, const void payload[.plen], size_t plen, key_serial_t keyring);
674760
675761// request_key
762// key_serial_t request_key(const char *type, const char *description, const char *_Nullable callout_info, key_serial_t dest_keyring);
676763
677764// keyctl
765// long syscall(SYS_keyctl, int operation, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5);
678766
679767// ioprio_set
768// int syscall(SYS_ioprio_set, int which, int who, int ioprio);
680769
681770// ioprio_get
771// int syscall(SYS_ioprio_set, int which, int who, int ioprio);
682772
683773// inotify_init
774// int inotify_init(void);
684775
685776// inotify_add_watch
777// int inotify_add_watch(int fd, const char *pathname, uint32_t mask);
686778
687779// inotify_rm_watch
780// int inotify_rm_watch(int fd, int wd);
688781
689782// migrate_pages
783// long migrate_pages(int pid, unsigned long maxnode, const unsigned long *old_nodes, const unsigned long *new_nodes);
690784
691785// openat
692786// int openat(int dirfd, const char *pathname, int flags, ... /* mode_t mode */ );
......@@ -698,8 +792,10 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
698792// int mknodat(int dirfd, const char *pathname, mode_t mode, dev_t dev);
699793
700794// fchownat
795// int fchownat(int dirfd, const char *pathname, uid_t owner, gid_t group, int flags);
701796
702797// futimesat
798// [[deprecated]] int futimesat(int dirfd, const char *pathname, const struct timeval times[2]);
703799
704800// fstatat64
705801// int fstatat(int dirfd, const char *restrict pathname, struct stat *restrict statbuf, int flags);
......@@ -735,22 +831,31 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
735831// int unshare(int flags);
736832
737833// set_robust_list
834// long syscall(SYS_set_robust_list, struct robust_list_head *head, size_t len);
738835
739836// get_robust_list
837// long syscall(SYS_get_robust_list, int pid, struct robust_list_head **head_ptr, size_t *len_ptr);
740838
741839// splice
840// ssize_t splice(int fd_in, off_t *_Nullable off_in, int fd_out, off_t *_Nullable off_out, size_t len, unsigned int flags);
742841
743842// tee
843// ssize_t tee(int fd_in, int fd_out, size_t len, unsigned int flags);
744844
745845// sync_file_range
846// int sync_file_range(int fd, off_t offset, off_t nbytes, unsigned int flags);
746847
747848// vmsplice
849// ssize_t vmsplice(int fd, const struct iovec *iov, size_t nr_segs, unsigned int flags);
748850
749851// move_pages
852// long move_pages(int pid, unsigned long count, void *pages[.count], const int nodes[.count], int status[.count], int flags);
750853
751854// utimensat
855// int utimensat(int dirfd, const char *pathname, const struct timespec times[_Nullable 2], int flags);
752856
753857// epoll_pwait
858// int epoll_pwait(int epfd, struct epoll_event *events, int maxevents, int timeout, const sigset_t *_Nullable sigmask);
754859
755860// signalfd
756861
......@@ -772,6 +877,7 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
772877// eventfd2
773878
774879// epoll_create1
880// int epoll_create1(int flags);
775881
776882// dup3
777883// int dup3(int oldfd, int newfd, int flags);
......@@ -780,6 +886,7 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
780886// int pipe2(int pipefd[2], int flags);
781887
782888// inotify_init1
889// int inotify_init1(int flags);
783890
784891// preadv
785892// ssize_t preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset);
......@@ -805,8 +912,10 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
805912// open_by_handle_at
806913
807914// clock_adjtime
915// int clock_adjtime(clockid_t clk_id, struct timex *buf);
808916
809917// syncfs
918// int syncfs(int fd);
810919
811920// sendmmsg
812921
......@@ -821,6 +930,7 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
821930// kcmp
822931
823932// finit_module
933// int syscall(SYS_finit_module, int fd, const char *param_values, int flags);
824934
825935// sched_setattr
826936
......@@ -846,6 +956,7 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
846956// membarrier
847957
848958// mlock2
959// int mlock2(const void addr[.len], size_t len, unsigned int flags);
849960
850961// copy_file_range
851962
......@@ -904,6 +1015,7 @@ pub fn write(fd: c_int, buf: []const u8) errno.Error!usize {
9041015// process_madvise
9051016
9061017// epoll_pwait2
1018// int epoll_pwait2(int epfd, struct epoll_event *events, int maxevents, const struct timespec *_Nullable timeout, const sigset_t *_Nullable sigmask);
9071019
9081020// mount_setattr
9091021