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] Change pthread equations


On Thu, 2003-03-27 at 23:52, Thomas Pfaff wrote:
> 2003-03-27  Thomas Pfaff  <tpfaff at gmx dot net>
> 
> 	* thread.cc: Change 1==foo equations to foo==1 throughout.

Thanks again - please apply.

I don't know if you meant to do this:
-  return (pthread_equal ((*mutex)->owner, self)) && 1 ==
(*mutex)->recursion_counter;
+  return ((*mutex)->recursion_counter == 1 && pthread_equal
((*mutex)->owner, self));

But it's actually more than just changing 1==foo to foo==1. If there
where side effects in pthread_equal, the meaning would have changed.
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]