This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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][BZ #14652] Fix deadlock on PI mutex inpthread_cond_wait cleanup handler


On Thu, 04 Oct 2012 15:50:18 -0600, Jeff wrote:
> +	andl	$(ROBUST_BIT|PI_BIT), %ebx
> +	cmpl	$PI_BIT, %ebx
> What's the point behind including ROBUST_BIT in the mask here?

It's because we do requeue_pi only when the mutex is non-robust and PI.

> +	movl	(%eax), %ebx
> +	andl	$TID_MASK, %ebx
> +	cmpl	%ebx, %gs:TID
> +	je	9f
> So when the TID doesn't match don't lock and just bail out?  Is that 
> really the right thing to do?

It's the other way around.  If the TIDs match, we don't lock and bail
out, because it means that we already had the lock.

Regards,
Siddhesh


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