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

Re: First cut of PowerPC support in NPTL



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Schwidefsky wrote:

> If the difference in counting between the normal lock and the mutex lock
> doesn't matter s390 could get rid of one family. The generated code is as
> good in both variants.

Then get rid of it.

For x86 there is the problem that with an initializer == 1 we can use
code which is slightly faster.  But in many situations initializers are
exported from <libpthread.h> and to be compatible we have to use a zero
initializer in that case.  Therefore two variants of the lowlevel lock.

For platforms without this problem (it probably is restricted to those
which have atomic instructions beside cmpxchg and bit set/test) use one
kind of lock, the one with zero initializers.  All code should fall into
place if you just adjust the header and use a blank source file for one
definition.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+aN7L2ijCOnn/RHQRAhSxAJ4ifWHulGCioOm6lC4PkxJ6Vzp+ZgCgqmKT
UBbWPGy/FLz2UZzz2y+vKFM=
=XqIR
-----END PGP SIGNATURE-----





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