Re: [PATCH][RFC] Remove R/W semaphore content from generic semaphore.h headers.

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

 



On Thu, Jul 19, 2007 at 05:37:58AM -0400, Robert P. J. Day wrote:
> apparently, for historical reasons, virtually every generic
> semaphore.h header file includes the more specific rwsem.h header
> file.  this is probably a bad thing, since someone who wants only a
> generic semaphore shouldn't be forced to include rwsem definitions as
> well if they don't need them.
>
> this patch removes all of those extraneous definitions, as well as
> some other rwsem-related cruft.  however, i wouldn't try to apply this
> patch as is since it's almost guaranteed to introduce breakage.
> chances are, there are some places in the code that use R/W semaphores
> but are just *coincidentally* getting those definitions via
> semaphore.h so everything works just fine.  as soon as you remove that
> include of <linux/rwsem.h> ... boom.
>
> the better solution would be for each arch maintainer to do this
> cleanup for their own code, if they think it's worth it.

No, the better solution is to setup a bunch of cross compilers instead
of asking arch maintainers to clean up after you. If you don't want to
do it, that's fine, but then refrain from touching core headers.

> (note the
> occasional definition of the macro RW_LOCK_BIAS, which also seems out
> of place in a generic semaphore.h header file, and which clearly
> belongs in rwsem.h.)
>
>  include/asm-alpha/semaphore.h     |    1 -
>  include/asm-arm/semaphore.h       |    1 -
>  include/asm-arm26/semaphore.h     |    1 -
>  include/asm-avr32/semaphore.h     |    1 -
>  include/asm-cris/semaphore.h      |    3 ---
>  include/asm-frv/semaphore.h       |    3 ---
>  include/asm-h8300/semaphore.h     |    1 -
>  include/asm-i386/semaphore.h      |    1 -
>  include/asm-ia64/semaphore.h      |    1 -
>  include/asm-m32r/semaphore.h      |    1 -
>  include/asm-m68k/semaphore.h      |    1 -
>  include/asm-m68knommu/semaphore.h |    1 -
>  include/asm-mips/semaphore.h      |    8 --------
>  include/asm-parisc/semaphore.h    |    1 -
>  include/asm-powerpc/semaphore.h   |    8 --------
>  include/asm-s390/semaphore.h      |    1 -
>  include/asm-sh/semaphore.h        |    1 -
>  include/asm-sh64/semaphore.h      |    1 -
>  include/asm-sparc/semaphore.h     |    1 -
>  include/asm-sparc64/semaphore.h   |    1 -
>  include/asm-v850/semaphore.h      |    1 -
>  include/asm-x86_64/semaphore.h    |    2 --
>  include/asm-xtensa/semaphore.h    |    1 -
>  23 files changed, 42 deletions(-)

-
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