[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-devel-list
Subject:    Re: [Mono-devel-list] critical-sections.c patch
From:       "Bernie Solomon" <bernard () ugsolutions ! com>
Date:       2003-08-28 18:20:05
Message-ID: 000901c36d91$015db5f0$b062f486 () cypci861
[Download RAW message or body]

Sorry if my last comment wasn't clear. All I meant is on some platforms
(including I think Linux) if you use an uninitialized mutex but the memory
for it happens to be zeroes anyway that it will work. In this case the new
check won't do anything. But for other platforms which require different
non-zero initial values set up the new check should show up the
uninitialized mutex quickly so it can at least be tracked and fixed easily.

Bernie
----- Original Message ----- 
From: "Dick Porter" <dick@ximian.com>
To: <mono-devel-list@lists.ximian.com>
Sent: Thursday, August 28, 2003 6:04 AM
Subject: Re: [Mono-devel-list] critical-sections.c patch


> On Wed, 2003-08-27 at 16:03, Bernie Solomon wrote:
> > Here is a small patch so failure to acquire a critical section is an
error
> > in particular so that when critical sections aren't initialized properly
> > this might be detected easier
>
> Thanks, patch applied (with minor formatting changes.)
>
> > Won't catch things on all platforms (e.g. where zeroes are OK
> > for a mutex initial state) but at least shows up for those that matter.
>
> I don't follow this part - pthread_mutex_lock() (mono_mutex_lock() is
> just a wrapper) should always return 0 on success.
>
> - Dick
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic