STATUS: 77% done

0000 T _gtime		compatible
    000e T _ftime		compatible
    00a4 T _stime		compatible
    00d2 T _setuid		compatible
    012e T _getuid		compatible
    0148 T _setgid		compatible
    019a T _getgid		compatible
    01b4 T _getpid		compatible
    01d0 T _setpgrp		compatible
    0206 T _sync		compatible
    020e T _nice		compatible
    027c T _unlink		compatible
    038e T _chdir		compatible
    0398 T _chroot		compatible
    03ac T _chdirec		compatible
    042a T _chmod		compatible
    04a0 T _chown		compatible
    04fa T _ssig		not compatible
    0612 T _kill		not compatible
    0722 T _times		not compatible
    077a T _profil		compatible
    07ac T _sprofil		not existent
    0872 T _alarm		compatible
    08aa T _pause		compatible
    08bc T _umask		compatible
    08e0 T _utime		not compatible
    09ee T _nosys		compatible
    09f8 T _nullsys		compatible
    09fa T _bpt			not existent
    0a0a T _utssys		not compatible
    0b0a T _ulimit		compatible
This commit is contained in:
Oliver Lehmann 2008-05-20 04:48:32 +00:00
parent b4b7540453
commit 10747c2524
1 changed files with 9 additions and 8 deletions

View File

@ -36,6 +36,7 @@ char sys4wstr[] = "@[$]sys4.c Rev : 4.2 09/26/83 22:15:02";
/* /*
* Everything in this file is a routine implementing a system call. * Everything in this file is a routine implementing a system call.
*/ */
#ifdef 0
gtime() gtime()
{ {
@ -568,6 +569,7 @@ default:
u.u_error = EFAULT; u.u_error = EFAULT;
} }
} }
#endif
ulimit() ulimit()
{ {
@ -575,7 +577,7 @@ ulimit()
int cmd; int cmd;
long arg; long arg;
} *uap; } *uap;
register stk, j, brk, i; register stk1, stk, brk, stk2;
uap = (struct a *)u.u_ap; uap = (struct a *)u.u_ap;
switch(uap->cmd) { switch(uap->cmd) {
@ -590,17 +592,16 @@ ulimit()
case 3: case 3:
if (u.u_segmented) { if (u.u_segmented) {
brk = u.u_segno[u.u_nsegs - 1]; brk = u.u_segno[u.u_nsegs - 1];
stk = 256; stk1 = 256;
} else { } else {
brk = 0; brk = 0;
stk = 256 - u.u_ssize; stk1 = 256 - u.u_ssize;
} }
i = umemory-USIZE-u.u_tsize-u.u_ssize-u.u_dsize; stk2 = umemory-USIZE-u.u_tsize-u.u_ssize-u.u_dsize;
stk = min(stk2,stk1);
u.u_r.r_val1 = brk; u.u_r.r_val1 = brk;
u.u_r.r_val2 = min(i,stk)<<8; u.u_r.r_val2 = stk<<8;
break; break;
} }
} }