public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Proposal for a userspace "architecture portability" library
@ 2004-12-05  0:53 Paul Mackerras
  2004-12-05  1:08 ` Robert Love
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Paul Mackerras @ 2004-12-05  0:53 UTC (permalink / raw)
  To: Linus Torvalds, David Woodhouse, David Howells, linux-kernel,
	libc-alpha

Some of our kernel headers implement generally useful abstractions
across all of the architectures we support.  I would like to make an
"architecture portability" library, based on the kernel headers but as
a separate project from the kernel, and intended for use in userspace.

The headers that I want to base this on are:

atomic.h
bitops.h
byteorder.h
rwsem.h
semaphore.h
spinlock.h
system.h (for mb et al., xchg, cmpxchg)
unaligned.h

There are some others that may also be useful: cache.h, checksum.h,
io.h, xor.h.

Now, clearly I can do this under the GPL.  However, I think it would
be more useful to have the library under the LGPL, which requires
either getting the permission of the authors of the kernel files, or
rewriting them from scratch.

Linus (and other kernel copyright holders) - would you be willing to
relicense such of the above files that have your copyright under the
LGPL for this purpose?

I'm looking for volunteers to help with porting and testing on various
architectures.  I can do x86, ppc and ppc64, and I know sparc{,64} and
m68k assembler, but for the rest I'll need help.

My hope is that distributions will be able to use this to replace some
of the headers in /usr/include/asm, and thus reduce the desire for
applications to include kernel headers.

Paul.


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Proposal for a userspace "architecture portability" library
@ 2004-12-05  6:18 Dan Kegel
  0 siblings, 0 replies; 13+ messages in thread
From: Dan Kegel @ 2004-12-05  6:18 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Roland McGrath <roland () redhat ! com> wrote:
 >> I don't think glibc exports any atomic operations.
 >
 >That is true.  But it does have implementations in bits/atomic.h for many
 >processors, and that is under the LGPL.

Interesting.  This seems to be new as of glibc-2.3.3.
(glibc-2.3.2 had implementations of all sorts of things,
spinlocks even, but they were all internal.)

gcc's libstdc++ also exports an atomicity.h
(in e.g. /usr/include/c++/3.4.2/bits/atomicity.h).

gcc's libjava also has its own set of lock primitives
(buried in a file named locks.h).

It would be quite the engineering feat to demonstrate
a gcc/glibc toolchain actually using your proposed
portability layer and demonstrate zero loss of performance.
Even that might not be enough to convince the glibc
maintainer to use it...
- Dan

-- 
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-12-06  9:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-05  0:53 Proposal for a userspace "architecture portability" library Paul Mackerras
2004-12-05  1:08 ` Robert Love
2004-12-05  1:47   ` Paul Mackerras
2004-12-05  2:10     ` Kevin P. Fleming
2004-12-05  3:51     ` Roland McGrath
2004-12-05  2:40 ` H. Peter Anvin
2004-12-05  2:44 ` Benjamin Herrenschmidt
2004-12-05  4:06   ` Kevin P. Fleming
2004-12-05 18:12 ` Alan Cox
2004-12-05 19:48 ` Joseph Seigh
2004-12-05 23:29 ` Joel Becker
2004-12-06  9:42 ` Adrian 'Dagurashibanipal' von Bidder
  -- strict thread matches above, loose matches on Subject: below --
2004-12-05  6:18 Dan Kegel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox