tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] libpthread NOLOAD removal
On Feb 17, 6:05am, manu%netbsd.org@localhost (Emmanuel Dreyfus) wrote:
-- Subject: Re: [PATCH] libpthread NOLOAD removal
| Christos Zoulas <christos%astron.com@localhost> wrote:
|
| > Why rename the #defines? I'd like to reduce the size of the diff as
| > much as possible.
|
| I tried to be consistent with other defines in pthread_types.h. Other
| defines from the file that are related to mutex and rwlock tend to be
| prefixed by _PT_. See _PT_MUTEX_MAGIC, for instance.
|
| Moreover, since pthread_types.h is available in /usr/include, it
| somewhat mitigate namespace pollution to have _PT_MUTEX_OWNER instead of
| MUTEX_OWNER.
|
| But perhaps a better way would be to guard the defines by a
| #if defined(__LIBPTHREAD_SOURCE__) || defined(_LIBC)
|
| If we go that way, we could also include hide stuff like
| _PT_MUTEX_MAGIC, which may not have good reasons to be exposed here. But
| is such a cleanup interesting in this first step? If we completely move
| mutex/condcar/rwlock to libc in a second step, everything will be
| libc-private, and the need for such an #if defined will disapear.
I prefer that they go in a separate file which does not get installed.
christos
Home |
Main Index |
Thread Index |
Old Index