This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] pthread_equal


On Thu, 2003-03-20 at 00:54, Thomas Pfaff wrote:
> 2003-03-19  Thomas Pfaff  <tpfaff at gmx dot net>
> 
> 	* pthread.cc (pthread_equal): Replacement for pthread_equal in
> 	thread.cc.
> 	* thread.cc: Rename pthread_equal to pthread::equal throughout.
> 	(pthread_equal): Remove.
> 	* thread.h (pthread::equal): New static method.

This seems mostly pointless to me.

A few notes:

Why use a static method? you'll always have one pthread to compare to ,
so using operator == is appropriate. In fact, operator == already does
the right thing as it is the entire contents of pthread_equal.

So: where pthread_equal is used internally, you could switch to (for
instance)
==
 if (&thread == joiner)
==

Rob
-- 
GPG key available at: <http://users.bigpond.net.au/robertc/keys.txt>.

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]