User: Password:
Subscribe / Log in / New account

Re: [PATCH] x86: Merge x86_32 and x86_64 cpu_idle()

From:  "H. Peter Anvin" <>
To:  Richard Weinberger <>
Subject:  Re: [PATCH] x86: Merge x86_32 and x86_64 cpu_idle()
Date:  Fri, 16 Mar 2012 14:22:24 -0700
Message-ID:  <>
Archive-link:  Article

On 03/16/2012 01:18 PM, Richard Weinberger wrote:
> +/*
> + * The idle thread. There's no useful work to be
> + * done, so just try to conserve power and have a
> + * low exit latency (ie sit in a loop waiting for
> + * somebody to say that they'd like to reschedule)
> + */
> +void cpu_idle()

Thou shalt not, in the language of C, under any circumstances, on the
pain of death, declare or define a function with an empty set of
parentheses, for though in the language of C++ it meaneth the same as
(void), in C it meaneth (...) which is of meaningless as there be no
anchor argument by which the types of the varadic arguments can be
expressed, and which misleadeth the compiler into allowing unsavory code
and in some cases generate really ugly stuff for varadic handling.


(Log in to post comments)

Re: [PATCH] x86: Merge x86_32 and x86_64 cpu_idle()

Posted Mar 25, 2012 11:18 UTC (Sun) by Kwi (subscriber, #59584) [Link]

Oops. Foiled by C ⊈ C++ again.

I, uh, think I forgot some C code in the oven, better go check on it...

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds