[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Mutex error checking (was: [PULL 00/26] Migration pull requ
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] Mutex error checking (was: [PULL 00/26] Migration pull request) |
Date: |
Thu, 02 Jul 2015 14:55:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Peter Maydell <address@hidden> writes:
> On 2 July 2015 at 13:17, Juan Quintela <address@hidden> wrote:
>> Why, o why, o why it didn't fail on linux, why. I think I know where
>> the problem is.
>
> I think OSX defaults to being pickier about its mutexes,
> whereas Linux defaults to "make lock/unlock as fast as
> possible and assume the program is correct".
>From pthread_mutexattr_settype(3p):
PTHREAD_MUTEX_ERRORCHECK
This type of mutex provides error checking. A thread
attempting to relock this mutex without first unlocking it
shall return with an error. A thread attempting to unlock
a mutex which another thread has locked shall return with
an error. A thread attempting to unlock an unlocked mutex
shall return with an error.
Not sure it detects this particular problem.
Should we use it with --enable-debug or something?
- [Qemu-devel] [PULL 19/26] vmstate: Create optional sections, (continued)
- [Qemu-devel] [PULL 19/26] vmstate: Create optional sections, Juan Quintela, 2015/07/01
- [Qemu-devel] [PULL 22/26] migration: ensure we start in NONE state, Juan Quintela, 2015/07/01
- [Qemu-devel] [PULL 23/26] migration: Use always helper to set state, Juan Quintela, 2015/07/01
- [Qemu-devel] [PULL 25/26] migration: create migration event, Juan Quintela, 2015/07/01
- [Qemu-devel] [PULL 26/26] migration: Add migration events on target side, Juan Quintela, 2015/07/01
- [Qemu-devel] [PULL 24/26] migration: No need to call trace_migrate_set_state(), Juan Quintela, 2015/07/01
- Re: [Qemu-devel] [PULL 00/26] Migration pull request, Peter Maydell, 2015/07/02