[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 07/21] add assertions on the owner of a QemuMute
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH 07/21] add assertions on the owner of a QemuMutex |
Date: |
Mon, 21 Feb 2011 11:22:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2011-02-21 11:15, Paolo Bonzini wrote:
> On 02/21/2011 10:50 AM, Jan Kiszka wrote:
>>>> + /* An EDEADLOCK would arrive after we reset the owner. So this
>>>> + assert is for ease of debugging (it lets you see what is the
>>>> + actual owner. */
>>
>> Don't get this. Why do you want to avoid the proper error detection of
>> pthread?
>
> Because by the time you get to error_exit mutex->owner has been NULL-ed
> out already. So it doesn't help to put a breakpoint on error_exit, you
> cannot find out which thread was the owner.
That's easy, "p <my_mutex>" will tell (the structure contains the
owner's tid).
And for debugging invalid mutex_unlock calls, it's more interesting to
track the call path of that thread which incorrectly claimed to hold the
lock.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
- [Qemu-devel] [PATCH 02/21] implement win32 dynticks timer, (continued)
- [Qemu-devel] [PATCH 02/21] implement win32 dynticks timer, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 04/21] replace qemu_thread_equal API with qemu_thread_is_current, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 05/21] add win32 qemu-thread implementation, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 06/21] include qemu-thread.h early, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 03/21] use win32 timer queues, Paolo Bonzini, 2011/02/21
- [Qemu-devel] [PATCH 07/21] add assertions on the owner of a QemuMutex, Paolo Bonzini, 2011/02/21
[Qemu-devel] [PATCH 08/21] remove CONFIG_THREAD, Paolo Bonzini, 2011/02/21
[Qemu-devel] [PATCH 09/21] inline cpu_halted into sole caller, Paolo Bonzini, 2011/02/21
[Qemu-devel] [PATCH 11/21] exit round-robin vcpu loop if cpu->stopped is true, Paolo Bonzini, 2011/02/21
[Qemu-devel] [PATCH 12/21] always signal pause_cond after stopping a VCPU, Paolo Bonzini, 2011/02/21
[Qemu-devel] [PATCH 13/21] do not use timedwait on qemu_halt_cond, Paolo Bonzini, 2011/02/21
[Qemu-devel] [PATCH 10/21] always qemu_cpu_kick after unhalting a cpu, Paolo Bonzini, 2011/02/21
[Qemu-devel] [PATCH 14/21] do not use timedwait on qemu_system_cond, Paolo Bonzini, 2011/02/21
[Qemu-devel] [PATCH 15/21] do not use timedwait on qemu_pause_cond, Paolo Bonzini, 2011/02/21