From owner-svn-src-all@freebsd.org Wed Jun 1 16:22:44 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF0C2B6187A; Wed, 1 Jun 2016 16:22:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F53E152A; Wed, 1 Jun 2016 16:22:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u51GMd7a077506 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 1 Jun 2016 19:22:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u51GMd7a077506 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u51GMcGv077505; Wed, 1 Jun 2016 19:22:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Jun 2016 19:22:38 +0300 From: Konstantin Belousov To: Ed Schouten Cc: Bruce Evans , Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r301071 - head/sys/sys Message-ID: <20160601162238.GM38613@kib.kiev.ua> References: <201605311905.u4VJ5geL053766@repo.freebsd.org> <20160601183101.X1028@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2016 16:22:45 -0000 On Wed, Jun 01, 2016 at 05:44:47PM +0200, Ed Schouten wrote: > Hi Bruce, > > 2016-06-01 11:31 GMT+02:00 Bruce Evans : > >> - 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 > > > > This gives the following pollution (which breaks almost everything since > > 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 > 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. No, it wouldn't. Replace the typedefs with the forward-struct names by the void *. The only other change would be the libthr, where some casts might be needed. Use void * directly in signal.h if possible.