Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Dec 2007 10:16:52 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, Olivier Houchard <cognet@freebsd.org>, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/lib/libc/gen closedir.c
Message-ID:  <86odd4chdn.fsf@ds4.des.no>
In-Reply-To: <20071204115427.D3192@delplex.bde.org> (Bruce Evans's message of "Tue\, 4 Dec 2007 12\:00\:57 %2B1100 \(EST\)")
References:  <200711192157.lAJLvSu6057416@repoman.freebsd.org> <868x4beu46.fsf@ds4.des.no> <20071204115427.D3192@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <brde@optusnet.com.au> writes:
> dd_lock cannot be declared as struct pthread_mutex *, since pthread_mutex
> is not permitted in the application namespace of dirent.h.  dirent.h
> is (was) careful about namespaces.  E.g., it keeps out of the application
> namespace for its own struct _dirdesc.  This doesn't work for pthread_mut=
ex
> since that is misdesigned.  (I think pthread_mutex_t is supposed to
> hide the implementation and reduce namespace problems, but struct
> pthread was only declared in <pthread.h> where it is permitted in the
> namespace, so <pthread.h> doesn't bother naming it struct _pthread_mutex.
> Other headers can't define it with a different name (tag) because differe=
nt
> tags give different structs.)

Since struct pthread_mutex is not part of the API, how about simply
renaming it to struct _pthread_mutex to circumvent the namespace issues?

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86odd4chdn.fsf>