svn commit: r205683 - head/sys/compat/linprocfs
Kostik Belousov
kostikbel at gmail.com
Fri Mar 26 11:49:30 UTC 2010
On Fri, Mar 26, 2010 at 11:43:15AM +0000, Alexander Leidinger wrote:
> Author: netchild
> Date: Fri Mar 26 11:43:15 2010
> New Revision: 205683
> URL: http://svn.freebsd.org/changeset/base/205683
>
> Log:
> Fix some bogus values in linprocfs.
>
> Submitted by: Petr Salinger <Petr.Salinger at seznam.cz>
> Verified on: GNU/kFreeBSD debian 8.0-1-686 (by submitter)
> PR: 144584
>
> Modified:
> head/sys/compat/linprocfs/linprocfs.c
>
> Modified: head/sys/compat/linprocfs/linprocfs.c
> ==============================================================================
> --- head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:33:12 2010 (r205682)
> +++ head/sys/compat/linprocfs/linprocfs.c Fri Mar 26 11:43:15 2010 (r205683)
> @@ -110,13 +110,36 @@ __FBSDID("$FreeBSD$");
> /*
> * Various conversion macros
> */
> +
> +/* The LINUX_USER_HZ is assumed 100 for now */
> +
> +#if defined(__i386__) && defined(__GNUCLIKE_ASM)
> +/* we need intermediate result as 64 bit, otherwise it overflows too early */
> +#define DO64_MULDIV(v,m,d) \
> +({ \
> + unsigned long rv0; \
> + unsigned long rv1; \
> + __asm__ __volatile__( \
> + "mull %1\n\t" \
> + "divl %2\n\t" \
> + :"=a" (rv0), "=d" (rv1) \
> + :"r" (d), "0" (v), "1" (m) \
> + :"cc" ); \
> + rv0; \
> +})
Why it is impossible to express the calculation in C ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20100326/8564bf7c/attachment.pgp
More information about the svn-src-all
mailing list