--- /dev/null
+libmon_s.a
+accept.s
+access.s
+acct.s
+alarm.c
+bind.s
+brk.s
+cerror.s
+chdir.s
+chmod.s
+chown.s
+chroot.s
+close.s
+connect.s
+creat.s
+dup.s
+dup2.s
+execl.s
+execle.s
+exect.s
+execv.s
+execve.s
+exit.c
+_exit.s
+cleanup.c
+fchmod.s
+fchown.s
+fcntl.s
+flock.s
+fork.s
+fstat.s
+fsync.s
+ftime.c
+ftruncate.s
+getdtabsz.s
+getegid.s
+geteuid.s
+getgid.s
+getgroups.s
+gethostid.s
+gethostnam.s
+getitimer.s
+getpagesiz.s
+getpeernam.s
+getpgrp.s
+getpid.s
+getppid.s
+getrlimit.s
+getsocknam.s
+getsockopt.s
+getuid.s
+gtty.c
+kill.s
+killpg.s
+link.s
+listen.s
+lstat.s
+mkdir.s
+mknod.s
+mount.s
+nice.c
+getprio.s
+open.s
+pause.c
+pipe.s
+profil.s
+ptrace.s
+quota.s
+read.s
+readlink.s
+readv.s
+reboot.s
+recv.s
+recvfrom.s
+recvmsg.s
+rename.s
+rmdir.s
+select.s
+send.s
+sendmsg.s
+sendto.s
+setgid.c
+setgroups.s
+sethostid.s
+sethostnam.s
+setitimer.s
+setpgrp.s
+setprio.s
+setquota.s
+setregid.s
+setrlimit.s
+setsockopt.s
+setuid.c
+setreuid.s
+shutdown.s
+sigblock.s
+signal.c
+sigpause.s
+sigsetmask.s
+sigstack.s
+sigvec.s
+socket.s
+socketpair.s
+stat.s
+stime.c
+settimday.s
+stty.c
+ioctl.s
+swapon.s
+symlink.s
+sync.s
+syscall.s
+tell.c
+lseek.s
+time.c
+gettimday.s
+times.c
+getrusage.s
+truncate.s
+umask.s
+umount.s
+unlink.s
+utime.c
+utimes.s
+vadvise.s
+vfork.s
+vhangup.s
+wait.s
+wait3.s
+write.s
+writev.s
--- /dev/null
+#include "syscall.h"
+DEFINE(__exit)
+SYSTEM(SYS_exit)
--- /dev/null
+#include "syscall.h"
+DEFINE(_accept)
+SYSTEM(SYS_accept)
--- /dev/null
+#include "syscall.h"
+DEFINE(_access)
+SYSTEM(SYS_access)
--- /dev/null
+#include "syscall.h"
+DEFINE(_acct)
+SYSTEM(SYS_acct)
--- /dev/null
+unsigned
+alarm(n)
+ unsigned n;
+{
+ struct { long l1,l2,l3,l4; } t1,t2;
+ t1.l1 = 0;
+ t1.l2 = 0;
+ t1.l4 = 0;
+ t1.l3 = n;
+ if (setitimer(0,&t1,&t2) < 0) return -1;
+ if (t2.l4) t2.l3++;
+ return t2.l3;
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_bind)
+SYSTEM(SYS_bind)
--- /dev/null
+#include "syscall.h"
+.globl _end
+DEFINE(_brk)
+ cmpl 4(ap),min
+ bgeq ok
+ movl min,4(ap)
+ok:
+ chmk $17
+ bcs err
+ movl 4(ap),cur
+ clrl r0
+ ret
+err:
+ jmp cerror
+
+DEFINE(_sbrk)
+ addl3 cur,4(ap),-(sp)
+ bcs err
+ pushl $1
+ movl ap,r3
+ movl sp,ap
+ chmk $17
+ bcs err
+ movl cur,r0
+ addl2 4(r3),cur
+ ret
+.data
+min: .long _end
+cur: .long _end
--- /dev/null
+ .globl _errno
+cerror:
+ movl r0,_errno
+ mnegl $1,r0
+ ret
--- /dev/null
+#include "syscall.h"
+DEFINE(_chdir)
+SYSTEM(SYS_chdir)
--- /dev/null
+#include "syscall.h"
+DEFINE(_chmod)
+SYSTEM(SYS_chmod)
--- /dev/null
+#include "syscall.h"
+DEFINE(_chwon)
+SYSTEM(SYS_chwon)
--- /dev/null
+#include "syscall.h"
+DEFINE(_chroot)
+SYSTEM(SYS_chroot)
--- /dev/null
+_cleanup() { }
--- /dev/null
+#include "syscall.h"
+DEFINE(_close)
+SYSTEM(SYS_close)
--- /dev/null
+#include "syscall.h"
+DEFINE(_connect)
+SYSTEM(SYS_connect)
--- /dev/null
+#include "syscall.h"
+DEFINE(_creat)
+SYSTEM(SYS_creat)
--- /dev/null
+#include "syscall.h"
+DEFINE(_dup)
+SYSTEM(SYS_dup)
--- /dev/null
+#include "syscall.h"
+DEFINE(_dup2)
+SYSTEM(SYS_dup2)
--- /dev/null
+#include "syscall.h"
+.globl _environ
+DEFINE(_execl)
+ pushl _environ
+ pushab 8(ap)
+ pushl 4(ap)
+ calls $3,_execve
+ ret
--- /dev/null
+#include "syscall.h"
+DEFINE(_execle)
+ movl (ap),r0
+ pushl (ap)[r0]
+ pushab 8(ap)
+ pushl 4(ap)
+ calls $3,_execve
+ ret
--- /dev/null
+#include "syscall.h"
+DEFINE(_exect)
+ bispsw $16
+ chmk $SYS_execve
+ jmp cerror
--- /dev/null
+#include "syscall.h"
+.globl _environ
+DEFINE(_execv)
+ pushl _environ
+ pushl 8(ap)
+ pushl 4(ap)
+ calls $3,_execve
+ ret
--- /dev/null
+#include "syscall.h"
+DEFINE(_execve)
+SYSTEM(SYS_execve)
--- /dev/null
+exit(n)
+{
+ _cleanup();
+ _exit(n);
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_fchmod)
+SYSTEM(SYS_fchmod)
--- /dev/null
+#include "syscall.h"
+DEFINE(_fchown)
+SYSTEM(SYS_fchown)
--- /dev/null
+#include "syscall.h"
+DEFINE(_fcntl)
+SYSTEM(SYS_fcntl)
--- /dev/null
+#include "syscall.h"
+DEFINE(_flock)
+SYSTEM(SYS_flock)
--- /dev/null
+#include "syscall.h"
+DEFINE(_fork)
+ chmk $SYS_fork
+ bcs err
+ jlbc r1,parent
+ clrl r0
+parent:
+ ret
+err:
+ jmp cerror
--- /dev/null
+#include "syscall.h"
+DEFINE(_fstat)
+SYSTEM(SYS_fstat)
--- /dev/null
+#include "syscall.h"
+DEFINE(_fsync)
+SYSTEM(SYS_fsync)
--- /dev/null
+#include <sys/types.h>
+
+ftime(p)
+ struct { time_t time; unsigned short millitm;
+ short timezone; short dstflag; } *p;
+{
+ struct { long l1,l2; } t1,t2;
+
+ if (gettimeofday(&t1,&t2) < 0) return -1;
+ p->time = t1.l1;
+ p->millitm = t1.l2/1000;
+ p->dstflag = t2.l2;
+ p->timezone = t2.l1;
+ return 0;
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_ftruncate)
+SYSTEM(SYS_ftruncate)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getdtablesize)
+SYSTEM(SYS_getdtablesize)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getegid)
+SYSNORET(SYS_getgid)
+ movl r1,r0
+ ret
--- /dev/null
+#include "syscall.h"
+DEFINE(_geteuid)
+SYSNORET(SYS_getuid)
+ movl r1,r0
+ ret
--- /dev/null
+#include "syscall.h"
+DEFINE(_getgid)
+SYSTEM(SYS_getgid)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getgroups)
+SYSTEM(SYS_getgroups)
--- /dev/null
+#include "syscall.h"
+DEFINE(_gethostid)
+SYSTEM(SYS_gethostid)
--- /dev/null
+#include "syscall.h"
+DEFINE(_gethostname)
+SYSTEM(SYS_gethostname)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getitimer)
+SYSTEM(SYS_getitimer)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getpagesize)
+SYSTEM(SYS_getpagesize)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getpeername)
+SYSTEM(SYS_getpeername)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getpgrp)
+SYSTEM(SYS_getpgrp)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getpid)
+SYSTEM(SYS_getpid)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getppid)
+SYSNORET(SYS_getpid)
+ movl r1,r0
+ ret
--- /dev/null
+#include "syscall.h"
+DEFINE(_getpriority)
+SYSTEM(SYS_getpriority)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getrlimit)
+SYSTEM(SYS_getrlimit)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getrusage)
+SYSTEM(SYS_getrusage)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getsockname)
+SYSTEM(SYS_getsockname)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getsockopt)
+SYSTEM(SYS_getsockopt)
--- /dev/null
+#include "syscall.h"
+DEFINE(_gettimeofday)
+SYSTEM(SYS_gettimeofday)
--- /dev/null
+#include "syscall.h"
+DEFINE(_getuid)
+SYSTEM(SYS_getuid)
--- /dev/null
+#include <sgtty.h>
+int gtty(fildes,argp)
+ int fildes ;
+ struct sgttyb *argp ;
+{
+ return ioctl(fildes,TIOCGETP,argp) ;
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_ioctl)
+SYSTEM(SYS_ioctl)
--- /dev/null
+#include "syscall.h"
+DEFINE(_kill)
+SYSTEM(SYS_kill)
--- /dev/null
+#include "syscall.h"
+DEFINE(_killpg)
+SYSTEM(SYS_killpg)
--- /dev/null
+#include "syscall.h"
+DEFINE(_link)
+SYSTEM(SYS_link)
--- /dev/null
+#include "syscall.h"
+DEFINE(_listen)
+SYSTEM(SYS_listen)
--- /dev/null
+#include "syscall.h"
+DEFINE(_lseek)
+SYSTEM(SYS_lseek)
--- /dev/null
+#include "syscall.h"
+DEFINE(_lstat)
+SYSTEM(SYS_lstat)
--- /dev/null
+#include "syscall.h"
+DEFINE(_mkdir)
+SYSTEM(SYS_mkdir)
--- /dev/null
+#include "syscall.h"
+DEFINE(_mknod)
+SYSTEM(SYS_mknod)
--- /dev/null
+#include "syscall.h"
+DEFINE(_mount)
+SYSNORET(SYS_mount)
+ clrl r0
+ ret
--- /dev/null
+nice(incr)
+{
+ extern int errno;
+ int sav = errno;
+ int prio;
+
+ errno = 0;
+ prio = getpriority(0,0);
+ if (prio == -1 && errno) return -1;
+ if (setpriority(0,0,prio+incr) < 0) return -1;
+ errno = sav;
+ return 0;
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_open)
+SYSTEM(SYS_open)
--- /dev/null
+pause() {
+ sigpause(sigblock());
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_pipe)
+SYSNORET(SYS_pipe)
+ movl 4(ap),r2
+ movl r0,(r2)+
+ movl r1,(r2)
+ clrl r0
+ ret
--- /dev/null
+#include "syscall.h"
+DEFINE(_profil)
+SYSTEM(SYS_profil)
--- /dev/null
+#include "syscall.h"
+DEFINE(_ptrace)
+ clrl _errno
+SYSTEM(SYS_ptrace)
--- /dev/null
+#include "syscall.h"
+DEFINE(_quota)
+SYSTEM(SYS_quota)
--- /dev/null
+#include "syscall.h"
+DEFINE(_read)
+SYSTEM(SYS_read)
--- /dev/null
+#include "syscall.h"
+DEFINE(_readlink)
+SYSTEM(SYS_readlink)
--- /dev/null
+#include "syscall.h"
+DEFINE(_readv)
+SYSTEM(SYS_readv)
--- /dev/null
+#include "syscall.h"
+DEFINE(_reboot)
+SYSNORET(SYS_reboot)
+ halt
--- /dev/null
+#include "syscall.h"
+DEFINE(_recv)
+SYSTEM(SYS_recv)
--- /dev/null
+#include "syscall.h"
+DEFINE(_recvfrom)
+SYSTEM(SYS_recvfrom)
--- /dev/null
+#include "syscall.h"
+DEFINE(_recvmsg)
+SYSTEM(SYS_recvmsg)
--- /dev/null
+#include "syscall.h"
+DEFINE(_rename)
+SYSTEM(SYS_rename)
--- /dev/null
+#include "syscall.h"
+DEFINE(_rmdir)
+SYSTEM(SYS_rmdir)
--- /dev/null
+#include "syscall.h"
+DEFINE(_select)
+SYSTEM(SYS_select)
--- /dev/null
+#include "syscall.h"
+DEFINE(_send)
+SYSTEM(SYS_send)
--- /dev/null
+#include "syscall.h"
+DEFINE(_sendmsg)
+SYSTEM(SYS_sendmsg)
--- /dev/null
+#include "syscall.h"
+DEFINE(_sendto)
+SYSTEM(SYS_sendto)
--- /dev/null
+setgid(u)
+{
+ return setregid(u,u);
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_setgroups)
+SYSTEM(SYS_setgroups)
--- /dev/null
+#include "syscall.h"
+DEFINE(_sethostid)
+SYSTEM(SYS_sethostid)
--- /dev/null
+#include "syscall.h"
+DEFINE(_sethostname)
+SYSTEM(SYS_sethostname)
--- /dev/null
+#include "syscall.h"
+DEFINE(_setitimer)
+SYSTEM(SYS_setitimer)
--- /dev/null
+#include "syscall.h"
+DEFINE(_setpgrp)
+SYSTEM(SYS_setpgrp)
--- /dev/null
+#include "syscall.h"
+DEFINE(_setpriority)
+SYSTEM(SYS_setpriority)
--- /dev/null
+#include "syscall.h"
+DEFINE(_setquota)
+SYSTEM(SYS_setquota)
--- /dev/null
+#include "syscall.h"
+DEFINE(_setregid)
+SYSTEM(SYS_setregid)
--- /dev/null
+#include "syscall.h"
+DEFINE(_setreuid)
+SYSTEM(SYS_setreuid)
--- /dev/null
+#include "syscall.h"
+DEFINE(_setrlimit)
+SYSTEM(SYS_setrlimit)
--- /dev/null
+#include "syscall.h"
+DEFINE(_setsockopt)
+SYSTEM(SYS_setsockopt)
--- /dev/null
+#include "syscall.h"
+DEFINE(_settimeofday)
+SYSTEM(SYS_settimeofday)
--- /dev/null
+setuid(u)
+{
+ return setreuid(u,u);
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_shutdown)
+SYSTEM(SYS_shutdown)
--- /dev/null
+#include "syscall.h"
+DEFINE(_sigblock)
+SYSTEM(SYS_sigblock)
--- /dev/null
+static long masks[32];
+static long flags[32];
+int (*
+signal(sig,handler))()
+ int (*handler)();
+{
+ struct {
+ int (*sv_handler)();
+ long sv_mask;
+ long sv_flags;
+ } v, ov;
+
+ v.sv_handler = handler;
+ v.sv_mask = masks[sig];
+ v.sv_flags = flags[sig];
+ if (sigvec(sig,&v, &ov) < 0) return (int (*)()) -1;
+ if (v.sv_mask != ov.sv_mask || v.sv_flags != ov.sv_flags) {
+ v.sv_mask = ov.sv_mask;
+ masks[sig] = ov.sv_mask;
+ v.sv_flags = ov.sv_flags;
+ flags[sig] = ov.sv_flags;
+ if (sigvec(sig,&v,(char *) 0) < 0) return (int (*)()) -1;
+ }
+ return ov.sv_handler;
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_sigpause)
+SYSTEM(SYS_sigpause)
--- /dev/null
+#include "syscall.h"
+DEFINE(_sigsetmask)
+SYSTEM(SYS_sigsetmask)
--- /dev/null
+#include "syscall.h"
+DEFINE(_sigstack)
+SYSTEM(SYS_sigstack)
--- /dev/null
+#include "syscall.h"
+DEFINE(_sigvec)
+SYSTEM(SYS_sigvec)
--- /dev/null
+#include "syscall.h"
+DEFINE(_socket)
+SYSTEM(SYS_socket)
--- /dev/null
+#include "syscall.h"
+DEFINE(_socketpair)
+SYSTEM(SYS_socketpair)
--- /dev/null
+#include "syscall.h"
+DEFINE(_stat)
+SYSTEM(SYS_stat)
--- /dev/null
+stime(tp)
+ long *tp;
+{
+ struct { long l1,l2; } x;
+
+ x.l1 = *tp;
+ x.l2 = 0;
+ return settimeofday(&x, (char *) 0);
+}
--- /dev/null
+#include <sgtty.h>
+int stty(fildes,argp)
+ int fildes ;
+ struct sgttyb *argp ;
+{
+ return ioctl(fildes,TIOCSETP,argp) ;
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_swapon)
+SYSTEM(SYS_swapon)
--- /dev/null
+#include "syscall.h"
+DEFINE(_symlink)
+SYSTEM(SYS_symlink)
--- /dev/null
+#include "syscall.h"
+DEFINE(_sync)
+SYSTEM(SYS_sync)
--- /dev/null
+#define DEFINE(sysn) .globl sysn; .align 1; sysn: .word 0
+#define SYSTEM(sys) chmk $sys; bcs err; ret; err: jmp cerror
+#define SYSNORET(sys) chmk $sys; bcc ok; jmp cerror; ok:
+#define SYS_exit 1
+#define SYS_fork 2
+#define SYS_read 3
+#define SYS_write 4
+#define SYS_open 5
+#define SYS_close 6
+#define SYS_creat 8
+#define SYS_link 9
+#define SYS_unlink 10
+#define SYS_execv 11
+#define SYS_chdir 12
+#define SYS_mknod 14
+#define SYS_chmod 15
+#define SYS_chown 16
+#define SYS_lseek 19
+#define SYS_getpid 20
+#define SYS_mount 21
+#define SYS_umount 22
+#define SYS_getuid 24
+#define SYS_ptrace 26
+#define SYS_access 33
+#define SYS_sync 36
+#define SYS_kill 37
+#define SYS_stat 38
+#define SYS_lstat 40
+#define SYS_dup 41
+#define SYS_pipe 42
+#define SYS_profil 44
+#define SYS_getgid 47
+#define SYS_acct 51
+#define SYS_ioctl 54
+#define SYS_reboot 55
+#define SYS_symlink 57
+#define SYS_readlink 58
+#define SYS_execve 59
+#define SYS_umask 60
+#define SYS_chroot 61
+#define SYS_fstat 62
+#define SYS_getpagesize 64
+#define SYS_mremap 65
+#define SYS_vfork 65
+#define SYS_sbrk 69
+#define SYS_sstk 70
+#define SYS_mmap 71
+#define SYS_vadvise 72
+#define SYS_munmap 73
+#define SYS_mprotect 74
+#define SYS_madvise 75
+#define SYS_vhangup 76
+#define SYS_mincore 78
+#define SYS_getgroups 79
+#define SYS_setgroups 80
+#define SYS_getpgrp 81
+#define SYS_setpgrp 82
+#define SYS_setitimer 83
+#define SYS_wait 84
+#define SYS_swapon 85
+#define SYS_getitimer 86
+#define SYS_gethostname 87
+#define SYS_sethostname 88
+#define SYS_getdtablesize 89
+#define SYS_dup2 90
+#define SYS_getdopt 91
+#define SYS_fcntl 92
+#define SYS_select 93
+#define SYS_setdopt 94
+#define SYS_fsync 95
+#define SYS_setpriority 96
+#define SYS_socket 97
+#define SYS_connect 98
+#define SYS_accept 99
+#define SYS_getpriority 100
+#define SYS_send 101
+#define SYS_recv 102
+#define SYS_bind 104
+#define SYS_setsockopt 105
+#define SYS_listen 106
+#define SYS_sigvec 108
+#define SYS_sigblock 109
+#define SYS_sigsetmask 110
+#define SYS_sigpause 111
+#define SYS_sigstack 112
+#define SYS_recvmsg 113
+#define SYS_sendmsg 114
+#define SYS_gettimeofday 116
+#define SYS_getrusage 117
+#define SYS_getsockopt 118
+#define SYS_readv 120
+#define SYS_writev 121
+#define SYS_settimeofday 122
+#define SYS_fchown 123
+#define SYS_fchmod 124
+#define SYS_recvfrom 125
+#define SYS_setreuid 126
+#define SYS_setregid 127
+#define SYS_rename 128
+#define SYS_truncate 129
+#define SYS_ftruncate 130
+#define SYS_flock 131
+#define SYS_sendto 133
+#define SYS_shutdown 134
+#define SYS_socketpair 135
+#define SYS_mkdir 136
+#define SYS_rmdir 137
+#define SYS_utimes 138
+#define SYS_revoke 140
+#define SYS_getpeername 141
+#define SYS_gethostid 142
+#define SYS_sethostid 143
+#define SYS_getrlimit 144
+#define SYS_setrlimit 145
+#define SYS_killpg 146
+#define SYS_setquota 148
+#define SYS_quota 149
+#define SYS_getsockname 150
--- /dev/null
+#include "syscall.h"
+DEFINE(_syscall)
+ movl 4(ap),r0
+ subl3 $1,(ap)+,(ap)
+ chmk r0
+ bcs err
+ ret
+err:
+ jmp cerror
--- /dev/null
+long
+tell(f)
+{
+ long lseek();
+
+ return lseek(f, 0L, 1);
+}
--- /dev/null
+long
+time(loc)
+ long *loc;
+{
+ struct { long l1,l2; } t1;
+
+ if (gettimeofday(&t1, (char *) 0) < 0) {
+ return -1;
+ }
+ if (loc) *loc = t1.l1;
+ return t1.l1;
+}
--- /dev/null
+#include <sys/types.h>
+
+#define Xval(xx) ((xx).l1*60+(xx).l2/(100000/6))
+
+times(bp)
+ struct { time_t l1,l2,l3,l4;} *bp;
+{
+ struct { struct { long l1,l2; }s1,s2; long x[20]; } t;
+ if (getrusage(0,&t) < 0) return -1;
+ bp->l1 = Xval(t.s1);
+ bp->l2 = Xval(t.s2);
+ if (getrusage(-1,&t) < 0) return -1;
+ bp->l3 = Xval(t.s1);
+ bp->l4 = Xval(t.s2);
+ return 0;
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_truncate)
+SYSTEM(SYS_truncate)
--- /dev/null
+#include "syscall.h"
+DEFINE(_umask)
+SYSTEM(SYS_umask)
--- /dev/null
+#include "syscall.h"
+DEFINE(_umount)
+SYSTEM(SYS_umount)
--- /dev/null
+#include "syscall.h"
+DEFINE(_unlink)
+SYSTEM(SYS_unlink)
--- /dev/null
+#include <sys/types.h>
+
+utime(file, timep)
+ char *file;
+ time_t timep[2];
+{
+ struct { long l1,l2,l3,l4; } x;
+
+ x.l2 = x.l4 = 0;
+ x.l1 = timep[0];
+ x.l3 = timep[1];
+ return utimes(file,&x);
+}
--- /dev/null
+#include "syscall.h"
+DEFINE(_utimes)
+SYSTEM(SYS_utimes)
--- /dev/null
+#include "syscall.h"
+DEFINE(_vadvise)
+SYSTEM(SYS_vadvise)
--- /dev/null
+#include "syscall.h"
+DEFINE(_vfork)
+ movl 16(fp),r2
+ movab newret,16(fp)
+ ret # cleans stack
+newret:
+ chmk $SYS_vfork
+ bcs err
+ tstl r1
+ beql parent
+ clrl r0
+parent:
+ jmp (r2)
+err:
+ movl r0,_errno
+ mnegl $1,r0
+ jmp (r2)
--- /dev/null
+#include "syscall.h"
+DEFINE(_vhangup)
+SYSTEM(SYS_vhangup)
--- /dev/null
+#include "syscall.h"
+DEFINE(_wait)
+SYSNORET(SYS_wait)
+ tstl 4(ap)
+ beql out
+ movl r1,*4(ap)
+out:
+ ret
--- /dev/null
+#include "syscall.h"
+DEFINE(_wait3)
+ movl 8(ap),r0
+ movl 12(ap),r1
+ bispsw $0xf
+ chmk $SYS_wait
+ bcs err
+ tstl 4(ap)
+ beql out
+ movl r1,*4(ap)
+out:
+ ret
+err:
+ jmp cerror
--- /dev/null
+#include "syscall.h"
+DEFINE(_write)
+SYSTEM(SYS_write)
--- /dev/null
+#include "syscall.h"
+DEFINE(_writev)
+SYSTEM(SYS_writev)