]> git.sesse.net Git - vlc/commit
vlc_object_attach: do not kill an object within the structure lock
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 11 Jun 2008 16:24:39 +0000 (19:24 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 11 Jun 2008 16:24:39 +0000 (19:24 +0300)
commit59e0425d59a9be5f496ada0d89ac7f1e0574d442
tree29ea86b2d59e016e5ced50436a794bfb40fe9802
parent0b06fc57642beaf6e21c5cfdcb9166a52f3dc1f8
vlc_object_attach: do not kill an object within the structure lock

Killing a the parent within vlc_object_attach looks like an awful hack
anyway. And there was a documented race condition, in addition to the
dead lock.

This reverts all the pluses from 99e8bcdd. vlc_object_kill() takes the
structure lock internally (through vlc_list_child()), so this would
always deadlock. Besides, we cannot take any lock within the structure
lock, lest we forbid any thread from ever manipulating the objects
structure while holding a lock on any object.
AFAIK, only object reference spins and the messages bank can be locked
within the structure lock.
src/misc/objects.c