From c0523622e577ef1889228295a232fe7d3b84b9f7 Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Thu, 22 May 2008 09:53:41 +0000 Subject: [PATCH] sync with WEGA 3.2 kernel --- WEGA/src/uts/sys/sys4.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/WEGA/src/uts/sys/sys4.c b/WEGA/src/uts/sys/sys4.c index 54f240e..0ced48b 100644 --- a/WEGA/src/uts/sys/sys4.c +++ b/WEGA/src/uts/sys/sys4.c @@ -28,10 +28,10 @@ char sys4wstr[] = "@[$]sys4.c Rev : 4.2 09/26/83 22:15:02"; #include #include #include -#include #include #include #include +#include /* * Everything in this file is a routine implementing a system call. @@ -440,6 +440,33 @@ profil() u.u_prof[0].pr_scale = uap->pcscale; } +sprofil() +{ + register struct a { + int segno; + long bufbase; + unsigned bufsize; + unsigned pcoffset; + unsigned pcscale; + } *uap; + + uap = (struct a *)u.u_ap; + if(!uap->segno) { + u.u_prof[0].pr_scale = 0; + } else { + if(u.u_nprof == 10) { + u.u_error = ENOPROF; + } else { + u.u_pr_segno[u.u_nprof] = uap->segno; + u.u_prof[u.u_nprof].pr_base = uap->bufbase; + u.u_prof[u.u_nprof].pr_size = uap->bufsize; + u.u_prof[u.u_nprof].pr_off = uap->pcoffset; + u.u_prof[u.u_nprof].pr_scale = uap->pcscale; + u.u_nprof++; + } + } +} + /* * alarm clock signal */ @@ -502,7 +529,7 @@ utime() (u.u_segmented && uap->tptr != NULL)) { if (copyin((caddr_t)uap->tptr, (caddr_t)tv, sizeof(tv))) { u.u_error = EFAULT; - return; + goto out; } } else { tv[0] = time; @@ -523,6 +550,7 @@ utime() ip->i_flag |= IACC|IUPD|ICHG; iupdat(ip, &tv[0], &tv[1]); } +out: iput(ip); }