Date: Sun, 31 Dec 2006 13:00:32 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 112352 for review Message-ID: <200612311300.kBVD0Weo070231@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112352 Change 112352 by rdivacky@rdivacky_witten on 2006/12/31 13:00:07 Fix style in linux_rt_sigtimedwait. Affected files ... .. //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#6 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#6 (text+ko) ==== @@ -429,9 +429,6 @@ linux_rt_sigtimedwait(struct thread *td, struct linux_rt_sigtimedwait_args *args) { -#ifdef DEBUG - struct proc *p = td->td_proc; -#endif int error; l_timeval ltv; struct timeval tv; @@ -446,25 +443,26 @@ printf(ARGS(rt_sigtimedwait, "*")); #endif if (args->sigsetsize != sizeof(l_sigset_t)) - return(EINVAL); + return (EINVAL); if ((error = copyin(args->mask, &lset, sizeof(lset)))) - return(error); + return (error); linux_to_bsd_sigset(&lset, &bset); tsa = NULL; if (args->timeout) { if ((error = copyin(args->timeout, <v, sizeof(ltv)))) - return(error); + return (error); #ifdef DEBUG if (ldebug(rt_sigtimedwait)) - printf("Linux-emul rt_sigtimedwait (%d): incoming timeout (%d/%d)\n", - p->p_pid, ltv.tv_sec, ltv.tv_usec); + printf(LMSG("linux_rt_sigtimedwait: incoming timeout (%d/%d)\n"), + ltv.tv_sec, ltv.tv_usec); #endif tv.tv_sec = (long)ltv.tv_sec; tv.tv_usec = (suseconds_t)ltv.tv_usec; if (itimerfix(&tv)) { - /* The timeout was invalid. Convert it to something + /* + * The timeout was invalid. Convert it to something * valid that will act as it does under Linux. */ tv.tv_sec += tv.tv_usec / 1000000; @@ -474,11 +472,11 @@ tv.tv_usec += 1000000; } if (tv.tv_sec < 0) - timevalclear(&tv); + timevalclear(&tv); #ifdef DEBUG if (ldebug(rt_sigtimedwait)) - printf("Linux-emul rt_sigtimedwait (%d): converted timeout (%d/%ld)\n", - p->p_pid, tv.tv_sec, tv.tv_usec); + printf(LMSG("linux_rt_sigtimedwait: converted timeout (%d/%ld)\n"), + tv.tv_sec, tv.tv_usec); #endif } TIMEVAL_TO_TIMESPEC(&tv, &ts); @@ -487,11 +485,10 @@ error = kern_sigtimedwait(td, bset, &info, tsa); #ifdef DEBUG if (ldebug(rt_sigtimedwait)) - printf("Linux-emul rt_sigtimedwait (%ld): sigtimedwait returning (%d)\n", - (long)p->p_pid, error); + printf(LMSG("linux_rt_sigtimedwait: sigtimedwait returning (%d)\n"), error); #endif if (error) - return error; + return (error); if (args->ptr) { memset(&linfo, 0, sizeof(linfo)); @@ -504,11 +501,10 @@ PROC_LOCK(td->td_proc); tdsignal(td->td_proc, td, info.ksi_signo, &info); PROC_UNLOCK(td->td_proc); - } else { + } else td->td_retval[0] = info.ksi_signo; - } - return error; + return (error); } int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612311300.kBVD0Weo070231>