[haiku-commits] Re: r34395 - in haiku/trunk/src/libs/compat/freebsd_network: . compat/sys

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 01 Dec 2009 09:00:28 +0100

On 2009-11-30 at 23:27:02 [+0100], coling@xxxxxx wrote:
> Author: colin
> Date: 2009-11-30 23:27:02 +0100 (Mon, 30 Nov 2009)
> New Revision: 34395
> Changeset: http://dev.haiku-os.org/changeset/34395/haiku
[...]
> Modified: haiku/trunk/src/libs/compat/freebsd_network/compat/sys/condvar.h
> ===================================================================
> --- haiku/trunk/src/libs/compat/freebsd_network/compat/sys/condvar.h    
> 2009-11-30 22:07:16 UTC (rev 34394)
> +++ haiku/trunk/src/libs/compat/freebsd_network/compat/sys/condvar.h    
> 2009-11-30 22:27:02 UTC (rev 34395)
> @@ -10,7 +10,7 @@
>  
>  
>  struct cv {
> -    int cv_waiters;
> +    int dummy;
>  };

It's still not much clearer to me, why you use this structure. Unless you 
really need uninit_condition_variables() to destroy condition variables -- 
which doesn't look like it from what I see -- I would simply get rid of the 
hash table, add the ConditionVariable pointer back to the cv structure 
(well, you could as well get rid of the structure as well and just use 
ConditionVariable pointers), and add static versions of the 
ConditionVariable::Notify{One,All}() methods that take the identifying 
object as first parameter.

CU, Ingo

Other related posts: