Date: Wed, 1 Jun 2016 17:44:47 +0200 From: Ed Schouten <ed@nuxi.nl> To: Bruce Evans <brde@optusnet.com.au> Cc: Ed Schouten <ed@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301071 - head/sys/sys Message-ID: <CABh_MKkXH-F4LepiVnmMptHOCbC=OH8FDvia8Zv-0mHUYrnbtA@mail.gmail.com> In-Reply-To: <20160601183101.X1028@besplex.bde.org> References: <201605311905.u4VJ5geL053766@repo.freebsd.org> <20160601183101.X1028@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Bruce, 2016-06-01 11:31 GMT+02:00 Bruce Evans <brde@optusnet.com.au>: >> - This header file has always depended on pthread_t, pthread_attr_t, >> struct timespec, size_t and uid_t. Only as of POSIX 2008, these >> dependencies have been states explicitly. They should now be defined. > > Not always. POSIX didn't have pthreads or timespecs before about 1993. Sure. s/always/for a long time/ >> - In our implementation, struct sigevent::sigev_notify_attributes has >> type "void *" instead of "pthread_attr_t *". My guess is that this was >> done to prevent pulling in the pthread types, but this can easily be >> avoided by using the underlying structure types. > > Not easily, since the tags of the underlying struct types are in the > application namespace, at least up to POSIX 2001. Yeah, it's quite unfortunate that we use structure types starting with 'pthread'. They should have had leading underscores. But in my opinion that's not a problem specific to this change; it's a problem with our pthread implementation in general. >> +#include <sys/_pthreadtypes.h> > > This gives the following pollution (which breaks almost everything since > <sys/types.h> includes this header: > - struct tag names pthread* > - struct member names state and mutex Yes. It would have made so much more sense if a header like <sys/_types.h> would have defined all pthread types as __pthread_t, __pthread_mutex_t, etc. That way there would have been a way to expose just pthread_t and pthread_attr_t without pulling in the rest. -- Ed Schouten <ed@nuxi.nl> Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABh_MKkXH-F4LepiVnmMptHOCbC=OH8FDvia8Zv-0mHUYrnbtA>