Re: [PATCH] Redefine instances of sema_init() to use standard form.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  i can't believe a simple cleanup patch has turned into such an
issue.

On Fri, 13 Oct 2006, Roman Zippel wrote:

> Hi,
>
> On Thursday 12 October 2006 09:44, Robert P. J. Day wrote:
>
> > Since there seems to be no compelling reason *not* to do this,
> [..]
> > -	/*
> > -	 * Logically,
> > -	 *   *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
> > -	 * except that gcc produces better initializing by parts yet.
> > -	 */
>
> You've seen this?

in fact, i did, and i admit that i have no idea what it means to say
that "gcc produces better initializing by parts yet."

there were a number of semaphore.h files whose comments made it clear
that GCC 2.7.2.3 was the *only* reason that the shorter, more direct
form wasn't being used, so it should be clear that those could be
changed.

there was only *one* of those header files (asm-alpha/semaphore.h)
that had the caution above, but i have no idea what "better
initializing" means?

"better" as in faster?  "better" as in more compact?  "better" as in
correct?  i mean, either the shorter, more direct initialization
*works* and produces the same result in this case, or it *doesn't*.
which is it?  or is that note perhaps a holdover from an old version
of gcc as well?

can you clarify what that comment means in the context of the alpha
architecture, and why simplifying the call would actually be a
mistake?

rday
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux